answer/docker-compose.yaml

25 lines
496 B
YAML
Raw Normal View History

2022-09-29 21:08:00 +08:00
version: "3.9"
2022-09-27 17:59:05 +08:00
services:
answer:
image: github.com/segmentfault/answer
2022-09-29 18:12:26 +08:00
ports:
- '9080:80'
restart: on-failure
depends_on:
2022-09-29 21:08:00 +08:00
db:
condition: service_healthy
2022-09-29 18:12:26 +08:00
links:
- db
2022-09-29 16:37:58 +08:00
db:
2022-09-29 21:08:00 +08:00
image: mariadb:10.4.7
2022-09-29 18:12:26 +08:00
ports:
- '13306:3306'
2022-09-29 16:37:58 +08:00
restart: on-failure
environment:
MYSQL_DATABASE: answer
2022-09-29 19:37:40 +08:00
MYSQL_ROOT_PASSWORD: root
2022-09-29 21:08:00 +08:00
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-uroot", "-proot"]
timeout: 20s
retries: 10