2022-09-29 16:32:35 +08:00
|
|
|
version: "3.1"
|
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
|
2022-09-28 16:24:33 +08:00
|
|
|
volumes:
|
2022-09-29 16:37:58 +08:00
|
|
|
- data:/data
|
2022-09-29 18:12:26 +08:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
links:
|
|
|
|
- db
|
2022-09-29 16:37:58 +08:00
|
|
|
db:
|
|
|
|
image: mysql:5.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
|
|
|
|
MYSQL_USER: root
|
|
|
|
MYSQL_PASSWORD: root
|
|
|
|
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
|
|
|
volumes:
|
|
|
|
- db:/var/lib/mysql
|
|
|
|
|
|
|
|
volumes:
|
2022-09-29 18:12:26 +08:00
|
|
|
data:
|
2022-09-29 16:37:58 +08:00
|
|
|
db:
|