Strapi is an open-source headless CMS that lets you create, manage and expose content via a customizable API. Built on Node.js, it supports REST and GraphQL out of the box. It features a visual content modeling interface, flexible roles and permissions, and a plugin system for extended functionality. Strapi is especially popular for JAMstack and decoupled web apps. It enables developers to build powerful backends quickly without reinventing the wheel.
Setup
docker-compose.yaml
version: '3'
networks:
docker_net:
external: true
volumes:
strapi:
strapi_pg:
services:
strapi:
image: strapi/strapi
container_name: strapi
restart: unless-stopped
environment:
DATABASE_CLIENT: postgres
DATABASE_NAME: strapi
DATABASE_HOST: strapi_pg
DATABASE_PORT: 5432
DATABASE_USERNAME: $POSTGRES_USER
DATABASE_PASSWORD: $POSTGRES_PASSWORD
volumes:
- strapi:/srv/app
networks:
- docker_net
ports:
- 1337:1337
depends_on:
- strapi_pg
strapi_pg:
image: postgres
container_name: strapi_pg
restart: unless-stopped
environment:
POSTGRES_DB: strapi
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
volumes:
- strapi_pg:/var/lib/postgresql/data
networks:
- docker_net