From 332d12bddfb06b7409e33ffa9a6020a5acdf93f4 Mon Sep 17 00:00:00 2001 From: isummer Date: Sun, 21 Aug 2022 18:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B9=E5=99=A8=E9=83=A8=E7=BD=B2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker.md | 6 ++++++ docker/build/docker-compose.yml | 2 +- docker/flyapps/docker-compose.yml | 1 + docker/init/clean.sh | 2 +- docker/mariadb/docker-compose.yml | 2 +- docker/scripts/build.sh | 9 +-------- docker/scripts/start_all.sh | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker.md b/docker.md index 84b1635..50e4914 100644 --- a/docker.md +++ b/docker.md @@ -46,6 +46,12 @@ const pro_base_env = { cd /data/FlyApps/docker/scripts sh build.sh ``` +##### 构建镜像的同时,下载依赖镜像 +```shell +docker pull 'bitnami/mariadb:10.7.3' +docker pull 'bitnami/redis:6.2.7' +docker pull 'nginx:1.21.3' +``` ##### 启动所有服务 ``` diff --git a/docker/build/docker-compose.yml b/docker/build/docker-compose.yml index 9cd1d0e..a8b0a0e 100644 --- a/docker/build/docker-compose.yml +++ b/docker/build/docker-compose.yml @@ -34,7 +34,7 @@ services: command: - bash - -c - - yarn config set registry https://registry.npm.taobao.org && yarn install && yarn build index && ([ ! -e /web/fir_client ] && \cp -a dist_index /web/fir_client || \cp -a dist_index/* /web/fir_client/) && echo build success + - yarn config set registry https://registry.npm.taobao.org && yarn install && yarn build index && ([ ! -e /web/fir_index ] && \cp -a dist_index /web/fir_index || \cp -a dist_index/* /web/fir_index/) && echo build success diff --git a/docker/flyapps/docker-compose.yml b/docker/flyapps/docker-compose.yml index e5131d3..7fd345b 100644 --- a/docker/flyapps/docker-compose.yml +++ b/docker/flyapps/docker-compose.yml @@ -17,6 +17,7 @@ services: - ../../data/flyapps/files:/data/fir_ser/files - ../../data/logs/flyapps/:/data/fir_ser/logs - ../../data/flyapps/supersign/:/data/fir_ser/supersign + - ../../nginx.conf.d:/data/cert networks: flyapps: ipv4_address: 172.31.31.100 diff --git a/docker/init/clean.sh b/docker/init/clean.sh index 62332fc..569ec2a 100644 --- a/docker/init/clean.sh +++ b/docker/init/clean.sh @@ -2,7 +2,7 @@ # # -for i in flyapps mariadb redis buildclient buildshort buildadmin;do echo $i;docker rm -f $i;done +for i in nginx flyapps mariadb redis buildclient buildshort buildadmin;do echo $i;docker rm -f $i;done docker network rm flyapps diff --git a/docker/mariadb/docker-compose.yml b/docker/mariadb/docker-compose.yml index 26c92e5..6986c2d 100644 --- a/docker/mariadb/docker-compose.yml +++ b/docker/mariadb/docker-compose.yml @@ -15,7 +15,7 @@ services: restart: always environment: - MARIADB_ROOT_PASSWORD=rootIPD.xx2.19 - - MARIADB_DATABASE=flyappnew + - MARIADB_DATABASE=flyapps - MARIADB_USER=flyuser - MARIADB_PASSWORD=KGzKjZpWBp4R4RSa #- ALLOW_EMPTY_PASSWORD=yes diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh index 5dc11d1..18ff406 100644 --- a/docker/scripts/build.sh +++ b/docker/scripts/build.sh @@ -3,11 +3,4 @@ # cd ../build/ - -for i in buildclient buildadmin;do - docker-compose up ${i} -done - -docker-compose build - - +docker-compose up buildclient buildadmin buildflyapps diff --git a/docker/scripts/start_all.sh b/docker/scripts/start_all.sh index b6c3775..d0b73b7 100644 --- a/docker/scripts/start_all.sh +++ b/docker/scripts/start_all.sh @@ -6,4 +6,4 @@ cd ../mariadb/ && docker-compose up -d cd ../redis/ && docker-compose up -d cd ../flyapps/ && docker-compose up -d - +docker logs -f flyapps