Work after logging related fixes.
This commit is contained in:
@@ -14,7 +14,10 @@ from fastapi import APIRouter, Depends, Header, HTTPException, Response, status
|
||||
# from pydantic import BaseModel, EmailStr, Field
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
from app.log import log, logging, logger_reset
|
||||
import logging
|
||||
from app.log import logger_reset
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from app.config import settings
|
||||
from app.db_sql import redis_lookup_id_random, sql_select
|
||||
|
||||
|
||||
127
app/log.py
127
app/log.py
@@ -8,65 +8,70 @@ from app.config import settings
|
||||
# 'uvicorn' under 'loggers' creates an output to the 'console' handler
|
||||
# Do not also add 'console' handler to the 'root' 'handlers' list
|
||||
# For now just using that to add or remove file logging options.
|
||||
logging.config.dictConfig({
|
||||
'version': 1,
|
||||
'formatters': {
|
||||
'default': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s'},
|
||||
'long': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S'},
|
||||
'short': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s', 'datefmt': '%H:%M:%S', 'use_colors': True},
|
||||
},
|
||||
#'filename': 'example.log',
|
||||
# 'level': logging.ERROR,
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'stream': 'ext://sys.stderr',
|
||||
'formatter': 'short',
|
||||
try:
|
||||
logging.config.dictConfig({
|
||||
'version': 1,
|
||||
'formatters': {
|
||||
'default': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s'},
|
||||
'long': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S'},
|
||||
'short': {'format': '[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s', 'datefmt': '%H:%M:%S', 'use_colors': True},
|
||||
},
|
||||
'log_file_all': {
|
||||
'level': 'NOTSET',
|
||||
'class': 'logging.handlers.RotatingFileHandler',
|
||||
'formatter': 'long',
|
||||
'filename': settings.LOG_PATH['app'],
|
||||
'maxBytes': 10485760, # 5,242,880 = 5 MB; 10,485,760 = 10 MB
|
||||
'backupCount': 9
|
||||
#'filename': 'example.log',
|
||||
# 'level': logging.ERROR,
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
'stream': 'ext://sys.stderr',
|
||||
'formatter': 'short',
|
||||
},
|
||||
'log_file_all': {
|
||||
'level': 'NOTSET',
|
||||
'class': 'logging.handlers.RotatingFileHandler',
|
||||
'formatter': 'long',
|
||||
'filename': settings.LOG_PATH['app'],
|
||||
'maxBytes': 10485760, # 5,242,880 = 5 MB; 10,485,760 = 10 MB
|
||||
'backupCount': 9
|
||||
},
|
||||
# 'log_file_warning': {
|
||||
# 'level': 'WARNING',
|
||||
# 'class': 'logging.handlers.RotatingFileHandler',
|
||||
# 'formatter': 'long',
|
||||
# 'filename': settings.LOG_PATH['app_warning'],
|
||||
# 'maxBytes': 512000, # 524,288 = 512KB
|
||||
# 'backupCount': 9
|
||||
# },
|
||||
# 'test_handler': {
|
||||
# 'class': 'logging.StreamHandler',
|
||||
# 'level': 'INFO',
|
||||
# 'formatter': 'short',
|
||||
# },
|
||||
# 'test_handler_all_rotate': {
|
||||
# 'class': 'logging.handlers.RotatingFileHandler',
|
||||
# 'level': 'NOTSET',
|
||||
# 'formatter': 'short',
|
||||
# 'filename': '/logs/test_rotate.log',
|
||||
# 'maxBytes': 100000, # 5120000 = 5 MB
|
||||
# 'backupCount': 2,
|
||||
# }
|
||||
},
|
||||
# 'log_file_warning': {
|
||||
# 'level': 'WARNING',
|
||||
# 'class': 'logging.handlers.RotatingFileHandler',
|
||||
# 'formatter': 'long',
|
||||
# 'filename': settings.LOG_PATH['app_warning'],
|
||||
# 'maxBytes': 512000, # 524,288 = 512KB
|
||||
# 'backupCount': 9
|
||||
# },
|
||||
# 'test_handler': {
|
||||
# 'class': 'logging.StreamHandler',
|
||||
# 'level': 'INFO',
|
||||
# 'formatter': 'short',
|
||||
# },
|
||||
# 'test_handler_all_rotate': {
|
||||
# 'class': 'logging.handlers.RotatingFileHandler',
|
||||
# 'level': 'NOTSET',
|
||||
# 'formatter': 'short',
|
||||
# 'filename': '/logs/test_rotate.log',
|
||||
# 'maxBytes': 100000, # 5120000 = 5 MB
|
||||
# 'backupCount': 2,
|
||||
# }
|
||||
},
|
||||
'loggers': {
|
||||
# 'uvicorn': {'handlers': ['default'], 'level': 'INFO'},
|
||||
'uvicorn': {'handlers': ['console'], 'level': 'INFO'},
|
||||
# 'uvicorn.error': {'level': 'INFO', 'handlers': ['default'], 'propagate': True},
|
||||
# 'uvicorn.error': {'level': 'INFO', 'handlers': ['console'], 'propagate': True},
|
||||
# 'uvicorn.access': {'handlers': ['access'], 'level': 'INFO', 'propagate': False},
|
||||
# 'gunicorn': {'handlers': ['console'], 'level': 'INFO'},
|
||||
},
|
||||
'root': {
|
||||
'handlers': ['log_file_all'], #, 'log_file_all', 'log_file_warning'],
|
||||
# 'handlers': ['console', 'log_file_all'], #, 'log_file_all', 'log_file_warning'],
|
||||
'level': 'WARNING', # WARNING
|
||||
}
|
||||
})
|
||||
'loggers': {
|
||||
# 'uvicorn': {'handlers': ['default'], 'level': 'INFO'},
|
||||
'uvicorn': {'handlers': ['console'], 'level': 'INFO'},
|
||||
# 'uvicorn.error': {'level': 'INFO', 'handlers': ['default'], 'propagate': True},
|
||||
# 'uvicorn.error': {'level': 'INFO', 'handlers': ['console'], 'propagate': True},
|
||||
# 'uvicorn.access': {'handlers': ['access'], 'level': 'INFO', 'propagate': False},
|
||||
# 'gunicorn': {'handlers': ['console'], 'level': 'INFO'},
|
||||
},
|
||||
'root': {
|
||||
'handlers': ['log_file_all'], #, 'log_file_all', 'log_file_warning'],
|
||||
# 'handlers': ['console', 'log_file_all'], #, 'log_file_all', 'log_file_warning'],
|
||||
'level': 'WARNING', # WARNING
|
||||
}
|
||||
})
|
||||
except Exception as e:
|
||||
print(f"Error configuring logging: {e}")
|
||||
# Fallback basic config?
|
||||
logging.basicConfig(level=logging.WARNING)
|
||||
|
||||
|
||||
log = logging.getLogger('root')
|
||||
@@ -76,6 +81,9 @@ log = logging.getLogger('root')
|
||||
# )
|
||||
|
||||
|
||||
def get_logger(name: str):
|
||||
return logging.getLogger(name)
|
||||
|
||||
|
||||
# ### BEGIN ### Log ### logger_reset() ###
|
||||
# https://realpython.com/primer-on-python-decorators/
|
||||
@@ -85,6 +93,11 @@ def logger_reset(func):
|
||||
# log.info(locals())
|
||||
@functools.wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
# Local logger instance to avoid global dependency issues
|
||||
# log = logging.getLogger(func.__module__) # Use the module's logger? Or root?
|
||||
# Using root for now to maintain behavior, but safer access
|
||||
log = logging.getLogger('root')
|
||||
|
||||
if func.__name__ not in ['redis_lookup_id_random', 'sql_enable_part', 'sql_hidden_part']:
|
||||
log.info(f'*** Function: "{func.__name__}()"')
|
||||
log.debug(f'*** Function Positional Args: {args}\nFunction Key Args: {kwargs}')
|
||||
|
||||
@@ -12,7 +12,8 @@ from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
from . import config
|
||||
# from app.lib_general import common_route_params, Common_Route_Params
|
||||
from app.log import log, logging
|
||||
import logging
|
||||
import app.log
|
||||
|
||||
# Import the routers here first:
|
||||
from app.routers import ae_obj, aether_cfg, api_crud, api_crud_v2, api_crud_v3, api, importing, sql, account, activity_log, address, archive, archive_content, contact, cont_edu_cert, cont_edu_cert_person, data_store, event, event_abstract, event_badge, event_badge_importing, event_badge_template, event_device, event_exhibit, event_exhibit_tracking, event_file, event_importing, event_location, event_person, event_person_detail, event_person_tracking, event_presentation, event_presenter, event_registration, event_session, flask_cfg, fundraising, grant, hosted_file, journal, journal_entry, log_client_viewing, lookup, membership_cfg, membership_group, membership_person_group, membership_person, membership_person_profile, membership_type, membership_person_type, order, order_v3, order_line, order_cart, organization, page, person, person_user, post, post_comment, product, qr, site, site_domain, user, util_email, websockets_redis, e_confex, e_cvent, c_idaa, e_impexium, e_stripe
|
||||
@@ -25,7 +26,7 @@ from app.db_sql import sql_select, reset_redis # , sql_connect
|
||||
print('### **** *** ** * The Aether API v4 using FastAPI is loading... * ** *** **** ###')
|
||||
|
||||
|
||||
#log = logging.getLogger('root')
|
||||
log = logging.getLogger(__name__)
|
||||
# log.setLevel(logging.DEBUG) # DEBUG > INFO > WARNING > ERROR > CRITICAL
|
||||
#logging.basicConfig(
|
||||
#format='[%(asctime)s] %(levelname)s @ %(module)s.%(funcName)s()#%(lineno)d: %(message)s'
|
||||
|
||||
@@ -4,7 +4,9 @@ from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator
|
||||
|
||||
from app.db_sql import redis_lookup_id_random
|
||||
from app.lib_general import log, logging
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from app.models.common_field_schema import base_fields, default_num_bytes
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator
|
||||
|
||||
from app.db_sql import redis_lookup_id_random
|
||||
from app.lib_general import log, logging, Response, status
|
||||
from app.lib_general import Response, status
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from app.config import settings
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@ from typing import Dict, List, Optional, Set, Union
|
||||
import json
|
||||
import urllib
|
||||
|
||||
from app.lib_general import log, logging, Common_Route_Params, common_route_params
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from app.lib_general import Common_Route_Params, common_route_params
|
||||
from app.models.response_models import *
|
||||
from app.ae_obj_types_def import obj_type_kv_li
|
||||
from app.db_sql import redis_lookup_id_random, sql_select, sql_insert, sql_update, sql_delete, get_id_random
|
||||
|
||||
372
documentation/docker-compose_2025-12-31_working.yml
Normal file
372
documentation/docker-compose_2025-12-31_working.yml
Normal file
@@ -0,0 +1,372 @@
|
||||
services:
|
||||
web:
|
||||
restart: no # unless-stopped
|
||||
container_name: ${CONTAINER_WEB}
|
||||
build:
|
||||
# context: ./builds
|
||||
context: ./
|
||||
dockerfile: aether_nginx.Dockerfile
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
|
||||
# NOTE: This does not seem to work with nginx yet???
|
||||
# NOTE: Use the template directory and .template extension for the .conf files.
|
||||
# - NGINX_SERVER_NAMES="dev-demo.oneskyit.com dev-example.oneskyit.com"
|
||||
# - NGINX_SERVER_NAMES="dev-idaa.oneskyit.com dev-ishlt.oneskyit.com"
|
||||
# - AE_DOMAIN_LIST:'dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com'
|
||||
# - NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com *.dev-connect.oneskyit.com dev-demo.oneskyit.com *.dev-demo.oneskyit.com dev-aapor.oneskyit.com *.dev-aapor.oneskyit.com dev-businessgroup.oneskyt.com *.dev-businessgroup.oneskyt.com dev-cmsc.oneskyit.com *.dev-cmsc.oneskyit.com dev-idaa.oneskyit.com *.dev-idaa.oneskyit.com dev-ishlt.oneskyit.com *.dev-ishlt.oneskyit.com dev-ncsd.oneskyit.com *.dev-ncsd.oneskyit.com dev-npa.oneskyit.com *.dev-npa.oneskyit.com dev-rli.oneskyit.com *.dev-rli.oneskyit.com test-app.oneskyit.com"
|
||||
- NGINX_SERVER_NAMES="flask_gunicorn.localhost demo.localhost dev.localhost dev.oneskyit.com dev-app.oneskyit.com dev-connect.oneskyit.com dev-demo.oneskyit.com dev-aacc.oneskyit.com dev-aapor.oneskyit.com dev-ascm.oneskyit.com dev-businessgroup.oneskyt.com dev-chow.oneskyit.com dev-cmsc.oneskyit.com dev-idaa.oneskyit.com dev-ishlt.oneskyit.com dev-lci.oneskyit.com dev-ncsd.oneskyit.com dev-npa.oneskyit.com dev-rli.oneskyit.com test-app.oneskyit.com"
|
||||
ports:
|
||||
- "${OSIT_WEB_HTTP_PORT}:80"
|
||||
- "${OSIT_WEB_HTTPS_PORT}:443"
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# - "8181:80"
|
||||
# - "8443:443"
|
||||
# networks:
|
||||
# - local-net
|
||||
volumes:
|
||||
- ./srv/html_php:/srv/html_php
|
||||
- ./srv/oneskyit_site:/srv/oneskyit_site
|
||||
|
||||
- ./srv/hosted_files_ln:/srv/hosted_files
|
||||
- ./srv/hosted_tmp_ln:/srv/hosted_tmp
|
||||
|
||||
# - ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./conf/nginx/options-ssl-nginx.conf:/etc/nginx/options-ssl-nginx.conf
|
||||
# - ./conf/nginx/other.conf:/etc/nginx/conf.d/other.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_api_v5_fastapi_gunicorn.conf:/etc/nginx/templates/site-enabled_aether_api_v5_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:
|
||||
# - php7
|
||||
# - aether_api_gunicorn
|
||||
- aether_api_gunicorn_red
|
||||
- aether_api_gunicorn_green
|
||||
# - aether_api_v5_gunicorn
|
||||
- aether_app_gunicorn
|
||||
|
||||
|
||||
# Need to fix the memory overcommit warning from Redis
|
||||
# https://ourcodeworld.com/articles/read/2083/how-to-remove-redis-warning-on-docker-memory-overcommit-must-be-enabled
|
||||
redis:
|
||||
restart: always
|
||||
container_name: ${CONTAINER_REDIS}
|
||||
image: redis
|
||||
# By default redis saves every 3600 seconds if there is at least 1 change.
|
||||
command: redis-server --save "" --loglevel warning
|
||||
# command: redis-server --save 60 1 --loglevel warning
|
||||
# build:
|
||||
# ports:
|
||||
# # host to image
|
||||
# # default port is 6379
|
||||
# - "${AE_REDIS_PORT}:6379"
|
||||
|
||||
# API - Default
|
||||
# aether_api_gunicorn:
|
||||
# restart: always
|
||||
# container_name: ${CONTAINER_AE_API}
|
||||
# build:
|
||||
# # context: ./builds
|
||||
# context: ./
|
||||
# dockerfile: aether_fastapi_gunicorn.Dockerfile
|
||||
# env_file:
|
||||
# - ./.env
|
||||
# environment:
|
||||
# - PUID=1000
|
||||
# - PGID=1000
|
||||
# ports:
|
||||
# - "${AE_API_GUNICORN_PORT}: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"
|
||||
# # - "db.oneskyit.com:104.237.143.4"
|
||||
# # 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:/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
|
||||
# # - ./tmp/root/aether_fastapi_requirements_current.txt:/aether_fastapi_requirements_current.txt
|
||||
# # - ./temp/ae_api/aether_fastapi_requirements_current.txt:/temp/aether_fastapi_requirements_current.txt
|
||||
# # - ./tmp/test:/var
|
||||
# # links:
|
||||
# # - redis
|
||||
# depends_on:
|
||||
# - redis
|
||||
# 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}"
|
||||
- "${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"
|
||||
# - "db.oneskyit.com:104.237.143.4"
|
||||
# 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:/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}"
|
||||
- "${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"
|
||||
# - "db.oneskyit.com:104.237.143.4"
|
||||
# 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:/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}"
|
||||
# - "${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"
|
||||
# # - "db.oneskyit.com:104.237.143.4"
|
||||
# # 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:/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 - 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}"
|
||||
# - "${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"
|
||||
# # - "db.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
|
||||
|
||||
# - ./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}"
|
||||
# - "${DOCKER_AE_APP_SERVER_EXTRA_HOST}"
|
||||
# - "${DOCKER_AE_API_SERVER_EXTRA_HOST}"
|
||||
# - "${DOCKER_AE_API_BAK_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_app_gunicorn:
|
||||
restart: always
|
||||
container_name: ${CONTAINER_AE_APP}
|
||||
build:
|
||||
# context: ./builds
|
||||
context: ./
|
||||
dockerfile: aether_flask_gunicorn.Dockerfile
|
||||
# image: tiangolo/uvicorn-gunicorn:latest
|
||||
env_file:
|
||||
- ./.env
|
||||
ports:
|
||||
- "${AE_APP_GUNICORN_PORT}:5005"
|
||||
# expose:
|
||||
# - 5005
|
||||
# networks:
|
||||
# - local-net
|
||||
extra_hosts:
|
||||
- "${DOCKER_AE_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_API_SERVER_EXTRA_HOST}"
|
||||
- "${DOCKER_AE_API_BAK_SERVER_EXTRA_HOST}"
|
||||
# - "${DOCKER_AE_API_V5_SERVER_EXTRA_HOST}"
|
||||
# - dev-api.oneskyit.com:192.168.32.20
|
||||
volumes:
|
||||
- ./conf/aether_flask_gunicorn_conf.py:/conf/gunicorn_flask_conf.py
|
||||
- ./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
|
||||
# - ./logs/aether_flask_gunicorn_access.log:/logs/gunicorn_access.log
|
||||
# - ./logs/aether_flask_gunicorn_error.log:/logs/gunicorn_error.log
|
||||
# - ./logs/aether_app.log:/logs/aether_app.log
|
||||
# - ./logs/aether_app_warning.log:/logs/aether_app_warning.log
|
||||
- ./srv/aether_app_ln:/srv/aether_app
|
||||
- ./srv/hosted_files_ln:/srv/hosted_files
|
||||
- ./srv/hosted_tmp_ln:/srv/hosted_tmp
|
||||
|
||||
- ./tmp/ae_app:/tmp
|
||||
depends_on:
|
||||
# - aether_api_gunicorn
|
||||
- aether_api_gunicorn_red
|
||||
- aether_api_gunicorn_green
|
||||
stdin_open: true # docker run -i
|
||||
tty: true # docker run -t
|
||||
Reference in New Issue
Block a user