2020-03-05 16:28:07 +00:00
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
db:
|
2020-03-17 20:55:32 +00:00
|
|
|
image: mysql:8.0.19
|
2020-03-19 21:37:57 +00:00
|
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
2020-03-05 16:28:07 +00:00
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-05 16:28:07 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-data:/var/lib/mysql
|
2020-03-19 21:37:57 +00:00
|
|
|
networks:
|
|
|
|
- backnet
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=example
|
|
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
|
|
|
|
backend:
|
|
|
|
build: backend
|
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-19 21:37:57 +00:00
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 5000:5000
|
2020-03-19 21:37:57 +00:00
|
|
|
networks:
|
2020-03-23 23:36:46 +00:00
|
|
|
- backnet
|
|
|
|
- frontnet
|
2020-03-05 16:28:07 +00:00
|
|
|
proxy:
|
|
|
|
build: proxy
|
2020-03-19 21:37:57 +00:00
|
|
|
restart: always
|
2020-03-05 16:28:07 +00:00
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 80:80
|
2020-03-19 21:37:57 +00:00
|
|
|
networks:
|
|
|
|
- frontnet
|
2020-03-05 16:28:07 +00:00
|
|
|
volumes:
|
2020-03-19 21:37:57 +00:00
|
|
|
db-data:
|
2020-03-05 16:28:07 +00:00
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|
2020-03-19 21:37:57 +00:00
|
|
|
networks:
|
|
|
|
backnet:
|
|
|
|
frontnet:
|