mirror of https://gitee.com/answerdev/answer.git
ci: docker compose
This commit is contained in:
parent
f1f20a228c
commit
9593963aee
|
@ -1,29 +1,12 @@
|
||||||
version: "3.9"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
answer:
|
answer:
|
||||||
image: answerdev/answer:latest
|
image: answerdev/answer
|
||||||
ports:
|
ports:
|
||||||
- '9080:80'
|
- '9080:80'
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: service_healthy
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./answer-data/data:/data
|
- answer-data:/data
|
||||||
db:
|
|
||||||
image: mariadb:10.4.7
|
volumes:
|
||||||
ports:
|
answer-data:
|
||||||
- '13306:3306'
|
|
||||||
restart: on-failure
|
|
||||||
environment:
|
|
||||||
MYSQL_DATABASE: answer
|
|
||||||
MYSQL_ROOT_PASSWORD: root
|
|
||||||
healthcheck:
|
|
||||||
test: [ "CMD", "mysqladmin" ,"ping", "-uroot", "-proot"]
|
|
||||||
timeout: 20s
|
|
||||||
retries: 10
|
|
||||||
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--skip-character-set-client-handshake']
|
|
||||||
volumes:
|
|
||||||
- ./answer-data/mysql:/var/lib/mysql
|
|
||||||
|
|
Loading…
Reference in New Issue