Architecture: Finalized dynamic scaling and Nginx gateway port configuration.
This commit is contained in:
@@ -14,29 +14,24 @@ services:
|
||||
ports:
|
||||
- "${OSIT_WEB_HTTP_PORT}:80"
|
||||
- "${OSIT_WEB_HTTPS_PORT}:443"
|
||||
- "${AE_API_GATEWAY_PORT}:80" # Entry point for external API traffic (HTTP)
|
||||
volumes:
|
||||
- ./srv/html_php:/srv/html_php
|
||||
- ./srv/oneskyit_site:/srv/oneskyit_site
|
||||
|
||||
- ${HOSTED_FILES_SRC}:/srv/hosted_files
|
||||
- ${HOSTED_TMP_SRC}:/srv/hosted_tmp
|
||||
|
||||
- ./conf/nginx/options-ssl-nginx.conf:/etc/nginx/options-ssl-nginx.conf
|
||||
- ./conf/nginx/site.conf:/etc/nginx/conf.d/0_site.conf
|
||||
|
||||
- ./conf/nginx/site-enabled_aether_fastapi_gunicorn.conf:/etc/nginx/templates/site-enabled_aether_fastapi_gunicorn.conf.template
|
||||
- ./conf/nginx/site-enabled_aether_flask_gunicorn.conf:/etc/nginx/templates/site-enabled_aether_flask_gunicorn.conf.template
|
||||
|
||||
- ./conf/certs/oneskyit_wild_fullchain.pem:/etc/certs/fullchain_wild.pem
|
||||
- ./conf/certs/oneskyit_wild_privkey.pem:/etc/certs/privkey_wild.pem
|
||||
- ./conf/certs/oneskyit.com_fullchain.pem:/etc/certs/fullchain.pem
|
||||
- ./conf/certs/oneskyit.com_privkey.pem:/etc/certs/privkey.pem
|
||||
- ./conf/certs/ssl-dhparams.pem:/etc/certs/ssl-dhparams.pem
|
||||
|
||||
- ./logs/web:/logs
|
||||
depends_on:
|
||||
- aether_api_gunicorn_red
|
||||
- aether_api_gunicorn_green
|
||||
- ae_api
|
||||
- aether_app_gunicorn
|
||||
|
||||
redis:
|
||||
@@ -44,8 +39,6 @@ services:
|
||||
container_name: ${CONTAINER_REDIS}
|
||||
image: redis
|
||||
command: redis-server --save "" --loglevel warning
|
||||
# ports:
|
||||
# - "${AE_REDIS_PORT}:6379"
|
||||
|
||||
mariadb:
|
||||
restart: always
|
||||
@@ -83,17 +76,15 @@ services:
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
# API - Red
|
||||
aether_api_gunicorn_red:
|
||||
ae_api:
|
||||
restart: always
|
||||
container_name: ${CONTAINER_AE_API_RED}
|
||||
# We don't use container_name here so we can scale
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: aether_fastapi_gunicorn.Dockerfile
|
||||
scale: ${AE_API_REPLICAS}
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "${AE_API_GUNICORN_PORT_RED}:5005"
|
||||
extra_hosts:
|
||||
- "${DOCKER_AE_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_APP_SERVER_EXTRA_HOST}"
|
||||
@@ -105,49 +96,10 @@ services:
|
||||
- ./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
|
||||
|
||||
- ${AE_API_SRC}:/srv/aether_api
|
||||
- ${HOSTED_FILES_SRC}:/srv/hosted_files
|
||||
- ${HOSTED_TMP_SRC}:/srv/hosted_tmp
|
||||
|
||||
- ./temp/ae_api:/temp
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
# API - Green
|
||||
aether_api_gunicorn_green:
|
||||
restart: always
|
||||
container_name: ${CONTAINER_AE_API_GREEN}
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: aether_fastapi_gunicorn.Dockerfile
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "${AE_API_GUNICORN_PORT_GREEN}:5005"
|
||||
extra_hosts:
|
||||
- "${DOCKER_AE_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_APP_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_API_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_API_BAK_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_DB_SERVER_EXTRA_HOST}"
|
||||
- "linode.oneskyit.com:104.237.143.4"
|
||||
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
|
||||
|
||||
- ${AE_API_SRC}:/srv/aether_api
|
||||
- ${HOSTED_FILES_SRC}:/srv/hosted_files
|
||||
- ${HOSTED_TMP_SRC}:/srv/hosted_tmp
|
||||
|
||||
- ./temp/ae_api:/temp
|
||||
depends_on:
|
||||
- redis
|
||||
@@ -174,14 +126,11 @@ services:
|
||||
- ./conf/aether_flask_requirements_current.txt:/requirements_current.txt
|
||||
- ./conf/aether_app_config.py:/srv/aether_app/flask_config_v2.py
|
||||
- ./logs/ae_app:/logs
|
||||
|
||||
- ${AE_APP_SRC}:/srv/aether_app
|
||||
- ${HOSTED_FILES_SRC}:/srv/hosted_files
|
||||
- ${HOSTED_TMP_SRC}:/srv/hosted_tmp
|
||||
|
||||
- ./tmp/ae_app:/tmp
|
||||
depends_on:
|
||||
- aether_api_gunicorn_red
|
||||
- aether_api_gunicorn_green
|
||||
- ae_api
|
||||
stdin_open: true
|
||||
tty: true
|
||||
tty: true
|
||||
|
||||
Reference in New Issue
Block a user