From 604f221f5d2fbf83ed111d34bd8ce0b5b4fa874b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=E8=8F=8C?= Date: Fri, 29 Apr 2022 01:46:42 +0800 Subject: [PATCH] docker-compose --- docker-compose.yml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 46acf3f..f01488f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,14 +4,19 @@ services: # The official v2 Traefik docker image image: mirrors2/tinyurl container_name: tinyurl - restart: always + restart: always + # networks: + # - tinyurl + # - tinyurl_db + depends_on: + - tinyurl_db ports: - "2830:2830" # volumes: #default log term # - $PWD/log:/app/tinyurl/log # - config.yml:/app/tinyurl/configs/config.yml - entrypoint: - - DSN=tinyurl:tinyurl@tcp(db:3306)/tinyurl?charset=utf8mb4 + environment: + - DSN=tinyurl:tinyurl@tcp(tinyurl_db:3306)/tinyurl?charset=utf8mb4 logging: driver: "json-file" options: @@ -21,8 +26,10 @@ services: image: mariadb container_name: tinyurl_db restart: always - networks: - - gitea + # networks: + # - tinyurl_db + ports: + - 3306:3306 expose: - 3306 command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci @@ -39,4 +46,23 @@ services: - /etc/timezone:/etc/timezone:ro # healthcheck: # test: ["CMD-SHELL", "/etc/init.d/mysql status"] - # interval: 30s \ No newline at end of file + # interval: 30s + # phpmyadmin: + # image: phpmyadmin:latest + # ports: + # - 8080:80 + # depends_on: + # - tinyurl_db + # # networks: + # # - tinyurl_db + # # - tinyurl + # environment: + # - PMA_HOST=tinyurl_db + # # - PMA_ARBITRARY=1 + # restart: unless-stopped +# networks: +# tinyurl_db: +# internal: true +# tinyurl: +# external: true +