From 5435d7bdc6124ec49558c824b2704d448ac77fd8 Mon Sep 17 00:00:00 2001 From: perl Date: Sat, 5 Oct 2024 07:35:25 +0300 Subject: [PATCH] update main dc --- control.sh | 13 +++++++----- docker-compose-devserver.yaml | 38 ----------------------------------- docker-compose.yaml | 34 ++++++++++++++++++------------- 3 files changed, 28 insertions(+), 57 deletions(-) delete mode 100644 docker-compose-devserver.yaml diff --git a/control.sh b/control.sh index b251e47..f3faefe 100644 --- a/control.sh +++ b/control.sh @@ -4,6 +4,9 @@ #exec 1>out.log #exec 2>logs/error.log +compose_file="docker-compose.yaml" +merge_file="docker-compose.limits.yaml" + root_folder=`pwd` menu=" @@ -25,11 +28,11 @@ do fi case "$input" in - 1) docker compose -f docker-compose-devserver.yaml -f docker-compose.limits.yaml up -d;break ;; - 2) docker compose -f docker-compose-devserver.yaml -f docker-compose.limits.yaml down && \ - docker compose -f docker-compose-devserver.yaml -f docker-compose.limits.yaml up -d;break ;; - 3) docker compose -f docker-compose-devserver.yaml -f docker-compose.limits.yaml down;break ;; - 4) docker compose -f docker-compose-devserver.yaml -f docker-compose.limits.yaml ps;break ;; + 1) docker compose -f $compose_file -f $merge_file up -d;break ;; + 2) docker compose -f $compose_file -f $merge_file down && \ + docker compose -f $compose_file -f $merge_file up -d;break ;; + 3) docker compose -f $compose_file -f $merge_file down;break ;; + 4) docker compose -f $compose_file -f $merge_file ps;break ;; *) echo "key not found" esac done diff --git a/docker-compose-devserver.yaml b/docker-compose-devserver.yaml deleted file mode 100644 index d6a6df2..0000000 --- a/docker-compose-devserver.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: reverse_dev -include: - - path: - - compose_extends/network.include.yaml - -services: - reverse: - extends: - file: compose_extends/docker-compose.base.yaml - service: reverse - build: - context: . - dockerfile: Dockerfiles/Dockerfile_devserver - args: - CONT_IMG_VER: "v1.0.0" - pull_policy: missing - volumes: - - "./sites-enabled:/etc/nginx/sites-enabled:ro" - ports: - - 80:80 - - 443:443 - networks: - - services - secrets: - - source: softsols_cert - target: /etc/nginx/ssl/live/softsols.ru/fullchain.pem - - source: softsols_key - target: /etc/nginx/ssl/live/softsols.ru/privkey.pem - -secrets: - softsols_cert: - name: softsols_cert - file: ./ssl/live/softsols.ru/fullchain.pem - external: false - softsols_key: - name: softsols_key - file: ./ssl/live/softsols.ru/privkey.pem - external: false \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index ccf3a58..d6a6df2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -name: reverse_default +name: reverse_dev include: - path: - compose_extends/network.include.yaml @@ -8,25 +8,31 @@ services: extends: file: compose_extends/docker-compose.base.yaml service: reverse + build: + context: . + dockerfile: Dockerfiles/Dockerfile_devserver + args: + CONT_IMG_VER: "v1.0.0" + pull_policy: missing volumes: - - "./locations:/etc/nginx/locations:ro" - - "./configuration:/etc/nginx/configuration:ro" - "./sites-enabled:/etc/nginx/sites-enabled:ro" - - "./error-pages:/etc/nginx/error-pages:ro" - - "./resources:/var/www/html/resources:ro" - - "./ssl:/etc/nginx/ssl:ro" - - "./logs:/var/log/nginx/" ports: - 80:80 - 443:443 networks: - services - configs: - - source: nginx_config - target: /etc/nginx/nginx.conf + secrets: + - source: softsols_cert + target: /etc/nginx/ssl/live/softsols.ru/fullchain.pem + - source: softsols_key + target: /etc/nginx/ssl/live/softsols.ru/privkey.pem -configs: - nginx_config: - name: times_new_nginx_config - file: ./nginx_config/nginx.conf +secrets: + softsols_cert: + name: softsols_cert + file: ./ssl/live/softsols.ru/fullchain.pem external: false + softsols_key: + name: softsols_key + file: ./ssl/live/softsols.ru/privkey.pem + external: false \ No newline at end of file