From 9593963aee12d7a57d62849d0d502f6b29e2a98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=8E=E5=9F=8E?= Date: Wed, 2 Nov 2022 08:01:37 +0000 Subject: [PATCH] ci: docker compose --- docker-compose.yaml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index dfa1853a..d7756b9f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,29 +1,12 @@ -version: "3.9" +version: "3" services: answer: - image: answerdev/answer:latest + image: answerdev/answer ports: - '9080:80' restart: on-failure - depends_on: - db: - condition: service_healthy - links: - - db volumes: - - ./answer-data/data:/data - db: - image: mariadb:10.4.7 - ports: - - '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 + - answer-data:/data + +volumes: + answer-data: