2020-11-09 20:12:20 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
backend:
|
2020-11-09 21:16:45 +00:00
|
|
|
container_name: status-affiliate-app
|
|
|
|
env_file: .env
|
2020-11-09 20:12:20 +00:00
|
|
|
image: strapi/strapi:3.2.5-node12-alpine
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=production
|
|
|
|
- DATABASE_CLIENT=postgres
|
2020-11-09 21:16:45 +00:00
|
|
|
- DATABASE_HOST=db
|
|
|
|
- DATABASE_PORT=5432
|
2020-11-09 20:12:20 +00:00
|
|
|
- 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:
|
2020-11-09 21:16:45 +00:00
|
|
|
- db
|
2020-11-09 20:12:20 +00:00
|
|
|
|
2020-11-09 21:16:45 +00:00
|
|
|
db:
|
|
|
|
container_name: status-affiliate-db
|
|
|
|
env_file: .env
|
2020-11-09 20:12:20 +00:00
|
|
|
image: postgres:13
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- ./db:/var/lib/postgresql/data
|
|
|
|
environment:
|
2020-11-09 21:16:45 +00:00
|
|
|
POSTGRES_DB: ${DATABASE_NAME}
|
2020-11-09 20:12:20 +00:00
|
|
|
POSTGRES_USER: ${DATABASE_USERNAME}
|
|
|
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|