status-affiliate/docker-compose.yml

36 lines
852 B
YAML
Raw Permalink Normal View History

version: '3'
services:
backend:
container_name: status-affiliate-app
env_file: .env
image: strapi/strapi:3.2.5-node12-alpine
restart: always
environment:
- NODE_ENV=production
- DATABASE_CLIENT=postgres
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_USERNAME=${DATABASE_USERNAME}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
ports:
- 1337:1337
volumes:
- ./backend:/srv/app
- ./build:/srv/app/public
depends_on:
- db
db:
container_name: status-affiliate-db
env_file: .env
image: postgres:13
restart: always
volumes:
- ./db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}