diff --git a/.env.default b/.env.default index d57a59c..7589727 100644 --- a/.env.default +++ b/.env.default @@ -6,6 +6,8 @@ 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_API_BLACK=ae_api_default_black +CONTAINER_AE_API_WHITE=ae_api_default_white CONTAINER_AE_APP=ae_app_default CONTAINER_PHP7=ae_php7_default CONTAINER_REDIS=ae_redis_default @@ -102,6 +104,8 @@ 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_PORT_BLACK=5069 +AE_API_GUNICORN_PORT_WHITE=5070 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/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf index bc265fc..b2bbcb8 100644 --- a/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf +++ b/conf/nginx/site-enabled_aether_fastapi_gunicorn.conf @@ -166,6 +166,8 @@ upstream fastapi_backend { server aether_api_gunicorn_red:5005 weight=20 max_fails=2 fail_timeout=30s; server aether_api_gunicorn_green:5005 weight=20 max_fails=2 fail_timeout=30s; server aether_api_gunicorn_blue:5005 weight=20 max_fails=2 fail_timeout=30s; + server aether_api_gunicorn_black:5005 weight=20 max_fails=2 fail_timeout=30s; + server aether_api_gunicorn_white:5005 weight=20 max_fails=2 fail_timeout=30s; # maintain up to 20 idle connections to the group of upstream servers # keepalive 20; diff --git a/docker-compose.yml b/docker-compose.yml index 272f15a..d487b54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -280,6 +280,66 @@ services: stdin_open: true # docker run -i tty: true # docker run -t + # API - Black + aether_api_gunicorn_black: + restart: always + container_name: ${CONTAINER_AE_API_BLACK} + build: + # context: ./builds + context: ./ + dockerfile: aether_fastapi_gunicorn.Dockerfile + env_file: + - ./.env + ports: + - "${AE_API_GUNICORN_PORT_BLACK}:5005" + extra_hosts: + - "${DOCKER_AE_SERVER_EXTRA_HOST}" + 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:/logs + + - ./srv/aether_api_ln:/srv/aether_api + - ./srv/hosted_files_ln:/srv/hosted_files + - ./srv/hosted_tmp_ln:/srv/hosted_tmp + + - ./temp/ae_api:/temp + depends_on: + - redis + stdin_open: true + tty: true + + # API - White + aether_api_gunicorn_white: + restart: always + container_name: ${CONTAINER_AE_API_WHITE} + build: + context: ./ + dockerfile: aether_fastapi_gunicorn.Dockerfile + env_file: + - ./.env + ports: + - "${AE_API_GUNICORN_PORT_WHITE}:5005" + extra_hosts: + - "${DOCKER_AE_SERVER_EXTRA_HOST}" + 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:/logs + + - ./srv/aether_api_ln:/srv/aether_api + - ./srv/hosted_files_ln:/srv/hosted_files + - ./srv/hosted_tmp_ln:/srv/hosted_tmp + + - ./temp/ae_api:/temp + depends_on: + - redis + stdin_open: true + tty: true # aether_api_v5_gunicorn: # restart: always