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