容器部署优化

pull/26/merge
isummer 2 years ago
parent 6439824468
commit 332d12bddf
  1. 6
      docker.md
  2. 2
      docker/build/docker-compose.yml
  3. 1
      docker/flyapps/docker-compose.yml
  4. 2
      docker/init/clean.sh
  5. 2
      docker/mariadb/docker-compose.yml
  6. 9
      docker/scripts/build.sh
  7. 2
      docker/scripts/start_all.sh

@ -46,6 +46,12 @@ const pro_base_env = {
cd /data/FlyApps/docker/scripts cd /data/FlyApps/docker/scripts
sh build.sh sh build.sh
``` ```
##### 构建镜像的同时,下载依赖镜像
```shell
docker pull 'bitnami/mariadb:10.7.3'
docker pull 'bitnami/redis:6.2.7'
docker pull 'nginx:1.21.3'
```
##### 启动所有服务 ##### 启动所有服务
``` ```

@ -34,7 +34,7 @@ services:
command: command:
- bash - bash
- -c - -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

@ -17,6 +17,7 @@ services:
- ../../data/flyapps/files:/data/fir_ser/files - ../../data/flyapps/files:/data/fir_ser/files
- ../../data/logs/flyapps/:/data/fir_ser/logs - ../../data/logs/flyapps/:/data/fir_ser/logs
- ../../data/flyapps/supersign/:/data/fir_ser/supersign - ../../data/flyapps/supersign/:/data/fir_ser/supersign
- ../../nginx.conf.d:/data/cert
networks: networks:
flyapps: flyapps:
ipv4_address: 172.31.31.100 ipv4_address: 172.31.31.100

@ -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 docker network rm flyapps

@ -15,7 +15,7 @@ services:
restart: always restart: always
environment: environment:
- MARIADB_ROOT_PASSWORD=rootIPD.xx2.19 - MARIADB_ROOT_PASSWORD=rootIPD.xx2.19
- MARIADB_DATABASE=flyappnew - MARIADB_DATABASE=flyapps
- MARIADB_USER=flyuser - MARIADB_USER=flyuser
- MARIADB_PASSWORD=KGzKjZpWBp4R4RSa - MARIADB_PASSWORD=KGzKjZpWBp4R4RSa
#- ALLOW_EMPTY_PASSWORD=yes #- ALLOW_EMPTY_PASSWORD=yes

@ -3,11 +3,4 @@
# #
cd ../build/ cd ../build/
docker-compose up buildclient buildadmin buildflyapps
for i in buildclient buildadmin;do
docker-compose up ${i}
done
docker-compose build

@ -6,4 +6,4 @@ cd ../mariadb/ && docker-compose up -d
cd ../redis/ && docker-compose up -d cd ../redis/ && docker-compose up -d
cd ../flyapps/ && docker-compose up -d cd ../flyapps/ && docker-compose up -d
docker logs -f flyapps

Loading…
Cancel
Save