2020-03-05 18:23:28 +00:00
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build: backend
|
|
|
|
ports:
|
|
|
|
- 80:8080
|
2020-03-12 13:16:55 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_DB: example
|
|
|
|
networks:
|
2020-03-20 17:19:08 +00:00
|
|
|
- spring-postgres
|
2020-03-05 18:23:28 +00:00
|
|
|
db:
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: example
|
|
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db-password
|
|
|
|
image: postgres
|
|
|
|
restart: always
|
|
|
|
secrets:
|
|
|
|
- db-password
|
|
|
|
volumes:
|
|
|
|
- db-data:/var/lib/postgresql/data
|
2020-03-12 13:16:55 +00:00
|
|
|
networks:
|
2020-03-20 17:19:08 +00:00
|
|
|
- spring-postgres
|
2020-03-05 18:23:28 +00:00
|
|
|
volumes:
|
|
|
|
db-data: {}
|
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|
2020-03-12 13:16:55 +00:00
|
|
|
networks:
|
2020-03-20 17:19:08 +00:00
|
|
|
spring-postgres: {}
|