1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/strapi/docker-compose.yml
2021-07-02 17:59:13 +08:00

37 lines
798 B
YAML

version: "3.8"
services:
strapi:
container_name: strapi
image: strapi/strapi:3.6.5-alpine
command: "strapi start"
ports:
- "1337:1337"
volumes:
- ./data/strapi:/srv/app
environment:
- NODE_ENV=production
- DATABASE_CLIENT=postgres
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_USERNAME=strapi
- DATABASE_PASSWORD=strapi
- DATABASE_NAME=strapi
depends_on:
- postgres
restart: unless-stopped
postgres:
container_name: postgres
image: postgres:13.3-alpine
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=strapi
- POSTGRES_PASSWORD=strapi
- POSTGRES_DB=strapi
restart: unless-stopped