2020-03-05 18:19:41 +00:00
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build: backend
|
|
|
|
ports:
|
2020-03-17 14:30:49 +00:00
|
|
|
- 8080:8080
|
2020-03-05 18:19:41 +00:00
|
|
|
secrets:
|
|
|
|
- db-password
|
|
|
|
db:
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: example
|
|
|
|
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db-password
|
2020-03-17 14:30:49 +00:00
|
|
|
image: mysql:8.0.19
|
2020-03-05 18:19:41 +00:00
|
|
|
restart: always
|
|
|
|
secrets:
|
|
|
|
- db-password
|
|
|
|
volumes:
|
|
|
|
- db-data:/var/lib/mysql
|
|
|
|
volumes:
|
|
|
|
db-data: {}
|
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|