2020-03-05 16:39:16 +00:00
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build: backend
|
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-05 16:39:16 +00:00
|
|
|
depends_on:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db
|
2020-03-05 16:39:16 +00:00
|
|
|
db:
|
|
|
|
image: postgres
|
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-05 16:39:16 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
- POSTGRES_DB=example
|
|
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
|
|
|
|
2020-03-05 16:39:16 +00:00
|
|
|
proxy:
|
|
|
|
build: proxy
|
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 80:80
|
2020-03-05 16:39:16 +00:00
|
|
|
depends_on:
|
2020-03-23 23:36:46 +00:00
|
|
|
- backend
|
2020-03-05 16:39:16 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
db-data:
|
2020-03-05 16:39:16 +00:00
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|