2020-03-05 18:19:41 +00:00
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build: backend
|
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 8080:8080
|
2020-03-05 18:19:41 +00:00
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-05 18:19:41 +00:00
|
|
|
db:
|
2021-11-08 10:41:35 +00:00
|
|
|
# We use a mariadb image which supports both amd64 & arm64 architecture
|
|
|
|
image: mariadb:10.6.4-focal
|
|
|
|
# If you really want to use MySQL, uncomment the following line
|
|
|
|
#image: mysql:8.0.27
|
2020-03-05 18:19:41 +00:00
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-password
|
2020-03-05 18:19:41 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
- db-data:/var/lib/mysql
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=example
|
|
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
|
2021-04-30 20:29:16 +00:00
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
- 33060
|
2020-03-05 18:19:41 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
db-data:
|
2020-03-05 18:19:41 +00:00
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|