Environment: Renamed .env.default to env.default for better visibility and updated it with new MariaDB and path parameters.

This commit is contained in:
Scott Idem
2026-01-12 16:50:48 -05:00
parent 00092d2058
commit 6ee6f24c00
2 changed files with 128 additions and 140 deletions

View File

@@ -1,140 +0,0 @@
# One Sky IT's Aether Framework and System
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_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
OSIT_ENV=development
# OSIT_ENV=production
# OSIT_ENV=testing
AE_LOG_LVL=warning # Python loglevel: warning, info, debug, etc
OSIT_WEB_HTTP_PORT=8080
OSIT_WEB_HTTPS_PORT=4443
# Max body size is for nginx gunicorn apps (AE app and AE API)
OSIT_WEB_MAX_BODY_SIZE=5120M
# For now this extra host variable is important for the AE Flask app to connect to the AE FastAPI API.
DOCKER_AE_SERVER_EXTRA_HOST=example.oneskyit.com:192.168.32.20
DOCKER_AE_APP_SERVER_EXTRA_HOST=example-app.oneskyit.com:192.168.32.20
DOCKER_AE_API_SERVER_EXTRA_HOST=example-api.oneskyit.com:192.168.32.20
DOCKER_AE_API_BAK_SERVER_EXTRA_HOST=example-bak-api.oneskyit.com:192.168.32.20
# DOCKER_AE_API_V5_SERVER_EXTRA_HOST=example-api-v5.oneskyit.com:192.168.32.20
DOCKER_AE_APP_EXTRA_HOST=example-api.oneskyit.com:192.168.32.20 # This should be a static(ish) IP. It may need to be externally routable? prod-api.oneskyit.com:104.237.143.4
# DOCKER_AE_APP_EXTRA_HOST_V5=example-api-v5.oneskyit.com:192.168.32.20
DOCKER_AE_DB_SERVER_EXTRA_HOST=db.oneskyit.com:104.237.143.4
# This is the server name for nginx for each of these sites.
# NEW NOTE: Each server name should be separated by a space.
# OLD NOTE: Only one server name per server_name in nginx with envsubst!!! A bug???
DOCKER_AE_API_SERVER_NAME=test-api.oneskyit.com example-api.oneskyit.com
# DOCKER_AE_API_V5_SERVER_NAME=example-api-v5.oneskyit.com
DOCKER_AE_APP_SERVER_NAME=test-app.oneskyit.com test-demo.oneskyit.com example-app.oneskyit.com
DOCKER_PHPMYADMIN_SERVER_NAME=example-phpmyadmin.oneskyit.com
DOCKER_OSIT_SERVER_NAME=example-docker.oneskyit.com # bak-docker.oneskyit.com dev-docker.oneskyit.com test-docker.oneskyit.com prod-docker.oneskyit.com
# This needs to be updated for each client's subdomain.
# This is *not* currently working with the nginx Docker Compose. It uses envsubst with a template conf file.
OSIT_NGINX_SERVER_NAMES=flask_gunicorn.localhost,demo.localhost,example.localhost,example.oneskyit.com,example-app.oneskyit.com,example-connect.oneskyit.com,*.example-connect.oneskyit.com,example-demo.oneskyit.com,*.example-demo.oneskyit.com
# Aether general shared config options
# For general shared config options like API access and use, database access and use, Redis, and SMTP
# home development, live testing, live production, onsite development, onsite testing, onsite production???
AE_CFG_ID=0
AE_SERVER=example.oneskyit.com
## Aether API access and use
AE_API_PROTOCOL=https
AE_API_SERVER=example-api.oneskyit.com
AE_API_SERVER_INTERNAL=example-api.oneskyit.com
AE_API_PORT=443
AE_API_PATH=
AE_API_SECRET_KEY=the-secret-api-key
## Aether DB access and use
AE_DB_SERVER=linode.oneskyit.com
AE_DB_PORT=3306
AE_DB_NAME=aether_dev
AE_DB_USERNAME=osit_aether
AE_DB_PASSWORD="the password with $$ escape"
# wait_timeout (MariaDB) is how long to keep an idle DB connection
AE_DB_WAIT_TIMEOUT=1800 # Not yet used!
# connection_timeout (MariaDB) is how long to try and create a new DB connection; bad handshake
AE_DB_CONNECTION_TIMEOUT=15 # (in seconds; default=15)
# pool_recycle (SQLAlchemy) is how long to keep using a particular connection that has passed a certain age
AE_DB_POOL_RECYCLE=1800
AE_DB_V5_SERVER=linode.oneskyit.com
AE_DB_V5_PORT=3306
AE_DB_V5_NAME=aether_v5_dev
AE_DB_V5_USERNAME=ae_v5
AE_DB_V5_PASSWORD=""
## Aether Redis access and use
AE_REDIS_SERVER=redis
AE_REDIS_PORT=6379
## Aether SMTP access and use
AE_SMTP_SERVER=linode.oneskyit.com
AE_SMTP_PORT=465
AE_SMTP_USERNAME=send_mail
# AE_SMTP_PASSWORD="not currently used"
# Gunicorn workers and threads:
# https://docs.gunicorn.org/en/stable/design.html#how-many-workers
# Aether API specific config options (FastAPI)
# AE_API_CFG_ID=0 # NOT CURRENTLY NEED OR USED
AE_API_ENV=development
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_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=20 # (default=30)
AE_API_GUNICORN_KEEPALIVE=5 # (default=2)
# More workers are noticeably faster, but use much more memory. Approximately 180 MiB to 200 MiB per worker.
AE_API_GUNICORN_WORKERS=2 # (default=2)
# Less threads seems to be more stable... Ideally just 1 thread per worker.
AE_API_GUNICORN_THREADS=2 # (default=2)
AE_API_RELOAD=False
AE_API_JWT_KEY="ABC123 22 CHARS" # 22 characters; super secret Aether JWT signing key
AE_API_ORIGINS_REGEX="(https://.*\.oneskyit\.com)|(https://.*\.oneskyit\.com:4443)|(https://.*\.oneskyit\.com:8443)" # default allows for some sane domains related to https://.*\.oneskyit\.com with some common extra ports
# Aether app specific config (Flask with Svelte)
AE_APP_CFG_ID=0
AE_APP_ENV=development
AE_APP_UX_MODE=default
# AE_APP_UX_MODE=onsite
# AE_APP_UX_MODE=native
AE_APP_DIR=/srv/aether_app
AE_APP_LOG_PATH="/logs/aether_app.log"
AE_APP_GUNICORN_PORT=5055
AE_APP_GUNICORN_TIMEOUT=1200 # (default=30; should be higher)
AE_APP_GUNICORN_GRACEFUL_TIMEOUT=20 # (default=30)
AE_APP_GUNICORN_KEEPALIVE=30 # (default=2)
AE_APP_GUNICORN_WORKERS=2 # (default=2)
AE_APP_GUNICORN_THREADS=1 # (default=1)
AE_APP_RELOAD=True
# Generate a new key with: # python -c 'import os; print(os.urandom(16))'
AE_APP_CACHE_SECRET_KEY="$\x93\x12\xb4R\x80R\xb5\xe50\xa0k\xc8#RN"
AE_APP_SESSION_LIFETIME=86400 # How long the browser cookies last in seconds (default=86400)
AE_APP_CACHE_TIMEOUT=5 # How long the Flask app caching last in seconds (default=5)

128
env.default Normal file
View File

@@ -0,0 +1,128 @@
# One Sky IT's Aether Framework and System (Template)
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_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
OSIT_ENV=development
# OSIT_ENV=production
# OSIT_ENV=testing
AE_LOG_LVL=warning # Python loglevel: warning, info, debug, etc
OSIT_WEB_HTTP_PORT=8080
OSIT_WEB_HTTPS_PORT=4443
# Max body size is for nginx gunicorn apps (AE app and AE API)
OSIT_WEB_MAX_BODY_SIZE=5120M
# For now this extra host variable is important for the AE Flask app to connect to the AE FastAPI API.
DOCKER_AE_SERVER_EXTRA_HOST=example.oneskyit.com:192.168.32.20
DOCKER_AE_APP_SERVER_EXTRA_HOST=example-app.oneskyit.com:192.168.32.20
DOCKER_AE_API_SERVER_EXTRA_HOST=example-api.oneskyit.com:192.168.32.20
DOCKER_AE_API_BAK_SERVER_EXTRA_HOST=example-bak-api.oneskyit.com:192.168.32.20
DOCKER_AE_APP_EXTRA_HOST=example-api.oneskyit.com:192.168.32.20
DOCKER_AE_DB_SERVER_EXTRA_HOST=db.oneskyit.com:104.237.143.4
# This is the server name for nginx for each of these sites.
DOCKER_AE_API_SERVER_NAME=example-api.oneskyit.com
DOCKER_AE_APP_SERVER_NAME=example-app.oneskyit.com
DOCKER_PHPMYADMIN_SERVER_NAME=example-phpmyadmin.oneskyit.com
DOCKER_OSIT_SERVER_NAME=example-docker.oneskyit.com
# This needs to be updated for each client's subdomain.
OSIT_NGINX_SERVER_NAMES=flask_gunicorn.localhost,demo.localhost,example.localhost,example.oneskyit.com
# Aether general shared config options
AE_CFG_ID=0
AE_SERVER=example.oneskyit.com
## Aether API access and use
AE_API_PROTOCOL=https
AE_API_SERVER=example-api.oneskyit.com
AE_API_SERVER_INTERNAL=example-api.oneskyit.com
AE_API_PORT=443
AE_API_SECRET_KEY=the-secret-api-key
## Aether DB access and use
AE_DB_SERVER=mariadb
AE_DB_PORT=3306
AE_DB_NAME=aether_dev
AE_DB_USERNAME=osit_aether
AE_DB_PASSWORD="the-password-with-\$\$-escape"
# MariaDB timeouts
AE_DB_WAIT_TIMEOUT=1800
AE_DB_CONNECTION_TIMEOUT=15
AE_DB_POOL_RECYCLE=1800
## Aether Redis access and use
AE_REDIS_SERVER=redis
AE_REDIS_PORT=6379
## Aether SMTP access and use
AE_SMTP_SERVER=linode.oneskyit.com
AE_SMTP_PORT=465
AE_SMTP_USERNAME=send_mail
# Aether API specific config options (FastAPI)
AE_API_ENV=development
AE_API_DIR=/srv/aether_api
AE_API_LOG_PATH="/logs/aether_api.log"
AE_API_GUNICORN_PORT=5065
AE_API_GUNICORN_PORT_RED=5066
AE_API_GUNICORN_PORT_GREEN=5067
AE_API_GUNICORN_TIMEOUT=2100
AE_API_GUNICORN_GRACEFUL_TIMEOUT=20
AE_API_GUNICORN_KEEPALIVE=5
AE_API_GUNICORN_WORKERS=2
AE_API_GUNICORN_THREADS=2
AE_API_RELOAD=False
AE_API_JWT_KEY="ABC123_22_CHARS_SEC_KEY"
AE_API_ORIGINS_REGEX="(https://.*\.oneskyit\.com)|(https://.*\.oneskyit\.com:4443)"
# Aether app specific config (Flask with Svelte)
AE_APP_CFG_ID=0
AE_APP_ENV=development
AE_APP_UX_MODE=default
AE_APP_DIR=/srv/aether_app
AE_APP_LOG_PATH="/logs/aether_app.log"
AE_APP_GUNICORN_PORT=5055
AE_APP_GUNICORN_TIMEOUT=1200
AE_APP_GUNICORN_GRACEFUL_TIMEOUT=20
AE_APP_GUNICORN_KEEPALIVE=30
AE_APP_GUNICORN_WORKERS=2
AE_APP_GUNICORN_THREADS=1
AE_APP_RELOAD=True
AE_APP_CACHE_SECRET_KEY="CACHE_SECRET_KEY"
AE_APP_SESSION_LIFETIME=86400
AE_APP_CACHE_TIMEOUT=5
# ------------------------------------------------------------------------------
# DOCKER VOLUME SOURCE PATHS
# ------------------------------------------------------------------------------
# These replace the fragile symlinks in srv/
# IMPORTANT: Use absolute paths to your application source directories
AE_API_SRC=/path/to/aether_api_fastapi
AE_APP_SRC=/path/to/aether_app_flask
HOSTED_FILES_SRC=/path/to/hosted_files
HOSTED_TMP_SRC=/path/to/hosted_tmp
# ------------------------------------------------------------------------------
# SERVICES CONFIG
# ------------------------------------------------------------------------------
AE_PMA_PORT=8081
# MariaDB Tuning (Adjust per environment hardware)
MARIADB_MAX_CONNECTIONS=500
MARIADB_INNODB_BUFFER_POOL_SIZE=512M
MARIADB_QUERY_CACHE_SIZE=32M
MARIADB_TMP_TABLE_SIZE=384M
MARIADB_TABLE_OPEN_CACHE=4000