answer/docker-compose.yaml

24 lines
410 B
YAML

version: "3.1"
services:
answer:
image: github.com/segmentfault/answer
volumes:
- data:/data
restart: on-failure
ports:
- 9080:80
db:
image: mysql:5.7
restart: on-failure
environment:
MYSQL_DATABASE: answer
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
volumes:
answer:
db: