From 3e72c4299c2c098f0b7bafad6a2a71d7446af043 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 7 Mar 2024 22:08:15 -0500 Subject: [PATCH] Hopefully this works.... --- .env.default | 6 ++ aether_container_env.code-workspace | 8 ++ docker-compose.yml | 154 ++++++++++++++++++++++++---- 3 files changed, 149 insertions(+), 19 deletions(-) create mode 100644 aether_container_env.code-workspace diff --git a/.env.default b/.env.default index bfc475b..d57a59c 100644 --- a/.env.default +++ b/.env.default @@ -3,6 +3,9 @@ TZ=US/Eastern CONTAINER_WEB=ae_web_default CONTAINER_AE_API=ae_api_default +CONTAINER_AE_API_RED=ae_api_default_red +CONTAINER_AE_API_GREEN=ae_api_default_green +CONTAINER_AE_API_BLUE=ae_api_default_blue CONTAINER_AE_APP=ae_app_default CONTAINER_PHP7=ae_php7_default CONTAINER_REDIS=ae_redis_default @@ -96,6 +99,9 @@ AE_API_DIR=/srv/aether_api AE_API_LOG_PATH="/logs/aether_api.log" AE_API_V5_LOG_PATH="/logs/aether_api_v5.log" AE_API_GUNICORN_PORT=5065 +AE_API_GUNICORN_PORT_RED=5066 +AE_API_GUNICORN_PORT_GREEN=5067 +AE_API_GUNICORN_PORT_BLUE=5068 AE_API_GUNICORN_TIMEOUT=2100 # (default=30; should be much higher) AE_API_GUNICORN_GRACEFUL_TIMEOUT=30 # (default=30) AE_API_GUNICORN_KEEPALIVE=30 # (default=2) diff --git a/aether_container_env.code-workspace b/aether_container_env.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/aether_container_env.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1d4dd3b..d0892fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,7 +52,7 @@ services: # - ./conf/nginx/site-enabled_aether-phpmyadmin.conf:/etc/nginx/templates/site-enabled_aether-phpmyadmin.conf.template # - ./conf/nginx/site-enabled_oneskyit.conf:/etc/nginx/conf.d/site-enabled_oneskyit.conf - - ./conf/nginx/site-enabled_oneskyit.conf:/etc/nginx/templates/site-enabled_oneskyit.conf.template + # - ./conf/nginx/site-enabled_oneskyit.conf:/etc/nginx/templates/site-enabled_oneskyit.conf.template - ./conf/nginx/site-enabled_aether_fastapi_gunicorn.conf:/etc/nginx/templates/site-enabled_aether_fastapi_gunicorn.conf.template # - ./conf/nginx/site-enabled_aether_api_v5_fastapi_gunicorn.conf:/etc/nginx/templates/site-enabled_aether_api_v5_fastapi_gunicorn.conf.template @@ -68,7 +68,7 @@ services: # volumes_from: # - nextcloud25 depends_on: - - php7 + # - php7 - aether_api_gunicorn # - aether_api_v5_gunicorn - aether_app_gunicorn @@ -81,25 +81,25 @@ services: # stdin_open: true # docker run -i # tty: true # docker run -t - php7: - restart: always - container_name: ${CONTAINER_PHP7} - # image: php:fpm - build: - context: ./ - dockerfile: php7.Dockerfile - volumes: - - ./srv/html_php:/srv/html_php - - ./srv/oneskyit_site:/srv/oneskyit_site - # - ./srv/nextcloud:/srv/nextcloud + # php7: + # restart: always + # container_name: ${CONTAINER_PHP7} + # # image: php:fpm + # build: + # context: ./ + # dockerfile: php7.Dockerfile + # volumes: + # - ./srv/html_php:/srv/html_php + # - ./srv/oneskyit_site:/srv/oneskyit_site + # # - ./srv/nextcloud:/srv/nextcloud - - ./conf/php/custom_php7.ini:/usr/local/etc/php/conf.d/custom_php7.ini + # - ./conf/php/custom_php7.ini:/usr/local/etc/php/conf.d/custom_php7.ini - - ./logs/php7:/logs - # ports: - # - "9007:9000" - # networks: - # - local-net + # - ./logs/php7:/logs + # # ports: + # # - "9007:9000" + # # networks: + # # - local-net # phpmyadmin: # image: phpmyadmin @@ -128,6 +128,7 @@ services: # # default port is 6379 # - "${AE_REDIS_PORT}:6379" + # API - Default aether_api_gunicorn: restart: always container_name: ${CONTAINER_AE_API} @@ -165,6 +166,121 @@ services: stdin_open: true # docker run -i tty: true # docker run -t + # API - Red + aether_api_gunicorn_red: + restart: always + container_name: ${CONTAINER_AE_API_RED} + build: + # context: ./builds + context: ./ + dockerfile: aether_fastapi_gunicorn.Dockerfile + env_file: + - ./.env + ports: + - "${AE_API_GUNICORN_PORT_RED}:5005" + extra_hosts: + - "${DOCKER_AE_SERVER_EXTRA_HOST}" + # expose: + # - 5005 + # networks: + # - local-net + volumes: + - ./conf/aether_fastapi_gunicorn_conf.py:/conf/gunicorn_fastapi_conf.py + - ./conf/aether_fastapi_requirements_current.txt:/requirements_current.txt + - ./conf/aether_api_config.py:/srv/aether_api/app/config.py + + - ./logs/ae_api_red:/logs + + - ./srv/aether_api_ln:/srv/aether_api + - ./srv/hosted_files_ln:/srv/hosted_files + - ./srv/hosted_tmp_ln:/srv/hosted_tmp + + # - ./tmp/ae_api:/tmp + - ./temp/ae_api:/temp + # links: + # - redis + depends_on: + - redis + stdin_open: true # docker run -i + tty: true # docker run -t + + # API - Blue + aether_api_gunicorn_blue: + restart: always + container_name: ${CONTAINER_AE_API_BLUE} + build: + # context: ./builds + context: ./ + dockerfile: aether_fastapi_gunicorn.Dockerfile + env_file: + - ./.env + ports: + - "${AE_API_GUNICORN_PORT_BLUE}:5005" + extra_hosts: + - "${DOCKER_AE_SERVER_EXTRA_HOST}" + # expose: + # - 5005 + # networks: + # - local-net + volumes: + - ./conf/aether_fastapi_gunicorn_conf.py:/conf/gunicorn_fastapi_conf.py + - ./conf/aether_fastapi_requirements_current.txt:/requirements_current.txt + - ./conf/aether_api_config.py:/srv/aether_api/app/config.py + + - ./logs/ae_api_blue:/logs + + - ./srv/aether_api_ln:/srv/aether_api + - ./srv/hosted_files_ln:/srv/hosted_files + - ./srv/hosted_tmp_ln:/srv/hosted_tmp + + # - ./tmp/ae_api:/tmp + - ./temp/ae_api:/temp + # links: + # - redis + depends_on: + - redis + stdin_open: true # docker run -i + tty: true # docker run -t + + # API - Green + aether_api_gunicorn_green: + restart: always + container_name: ${CONTAINER_AE_API_GREEN} + build: + # context: ./builds + context: ./ + dockerfile: aether_fastapi_gunicorn.Dockerfile + env_file: + - ./.env + ports: + - "${AE_API_GUNICORN_PORT_GREEN}:5005" + extra_hosts: + - "${DOCKER_AE_SERVER_EXTRA_HOST}" + # expose: + # - 5005 + # networks: + # - local-net + volumes: + - ./conf/aether_fastapi_gunicorn_conf.py:/conf/gunicorn_fastapi_conf.py + - ./conf/aether_fastapi_requirements_current.txt:/requirements_current.txt + - ./conf/aether_api_config.py:/srv/aether_api/app/config.py + + - ./logs/ae_api_green:/logs + + - ./srv/aether_api_ln:/srv/aether_api + - ./srv/hosted_files_ln:/srv/hosted_files + - ./srv/hosted_tmp_ln:/srv/hosted_tmp + + # - ./tmp/ae_api:/tmp + - ./temp/ae_api:/temp + # links: + # - redis + depends_on: + - redis + stdin_open: true # docker run -i + tty: true # docker run -t + + # aether_api_v5_gunicorn: # restart: always # container_name: ae_api_v5_dev