diff --git a/.env.default b/.env.default index 28b3d08..73c11db 100644 --- a/.env.default +++ b/.env.default @@ -3,7 +3,6 @@ # ------------------------------------------------------------------------------ # Copy this file to .env and fill in real values. # .env is gitignored — never commit the live file. -# Profile: Scott's Workstation (Arch Linux) # ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------ @@ -12,9 +11,6 @@ # System timezone for all containers TZ=US/Eastern -# Environment mode (development, testing, production) -OSIT_ENV=development - # Logging level for the API and background workers (debug, info, warning, error) AE_LOG_LVL=debug @@ -24,52 +20,49 @@ AE_LOG_LVL=debug # COMPOSE_PROFILES=database # ------------------------------------------------------------------------------ -# CONTAINER NAMES +# STACK ISOLATION # ------------------------------------------------------------------------------ -# Internal Docker container names (should be unique per environment) +# Unique Docker network name per stack (prevents collisions when running test/prod on same host) +AE_NETWORK_NAME=ae_dev_net + +# Internal Docker container names (must be unique per stack) +# Note: ae_api and ae_app are scaled services — Docker does not allow container_name on those. CONTAINER_WEB=ae_web_dev -CONTAINER_AE_API=ae_api_dev -CONTAINER_AE_APP=ae_app_dev CONTAINER_REDIS=ae_redis_dev +CONTAINER_DOZZLE=ae_dozzle_dev CONTAINER_MARIADB=ae_mariadb_dev CONTAINER_PMA=ae_pma_dev +CONTAINER_AE_OPS=ae_ops_dev # ------------------------------------------------------------------------------ # NETWORK & PROXY SETTINGS # ------------------------------------------------------------------------------ # Local Nginx listener ports on the host system OSIT_WEB_HTTP_PORT=8888 -OSIT_WEB_HTTPS_PORT=443 # Maximum allowed file upload size (Global for Nginx) OSIT_WEB_MAX_BODY_SIZE=5120M -# AE API (Node SvelteKit) Gateway Port for External Reverse Proxy -# Used when a master proxy (e.g. Home Server) forwards traffic to this node -# The gateway port has Docker with Nginx running the internal reverse proxy +# Gateway ports for external reverse proxy (Home Server → this node → Docker Nginx) +AE_APP_GATEWAY_PORT=3001 AE_API_GATEWAY_PORT=5060 -# DNS Overrides (Injected into containers' /etc/hosts) -# Format: DOMAIN:IP_ADDRESS -# Useful for container-to-container routing when using real domain names -DOCKER_AE_SERVER_EXTRA_HOST=dev.oneskyit.com:XXXX -DOCKER_AE_APP_SERVER_EXTRA_HOST=dev-app.oneskyit.com:XXXX -DOCKER_AE_API_SERVER_EXTRA_HOST=dev-api.oneskyit.com:XXXX -DOCKER_AE_API_BAK_SERVER_EXTRA_HOST=test-api.oneskyit.com:XXXX -DOCKER_AE_DB_SERVER_EXTRA_HOST=vpn-db.oneskyit.com:XXXX +# Dozzle log viewer port +AE_DOZZLE_PORT=8881 -# Nginx Server Names (Used in vhost configuration templates) +# Nginx Server Names (used in vhost config templates) DOCKER_AE_API_SERVER_NAME=dev-api.oneskyit.com DOCKER_AE_APP_SERVER_NAME=dev-example.oneskyit.com DOCKER_PHPMYADMIN_SERVER_NAME=dev-phpmyadmin.oneskyit.com DOCKER_OSIT_SERVER_NAME=dev.oneskyit.com + # ------------------------------------------------------------------------------ # DATABASE SETTINGS (MariaDB) # ------------------------------------------------------------------------------ # To use an EXTERNAL database: # 1. Set COMPOSE_PROFILES= (empty) above to disable local DB containers. -# 2. Set AE_DB_SERVER to the external IP or Hostname. +# 2. Set AE_DB_SERVER to the external IP or hostname. # 3. Ensure the external DB allows connections from this host's IP. # DB Hostname (use 'mariadb' for the local container, or a remote IP/FQDN) @@ -78,13 +71,12 @@ AE_DB_SERVER=vpn-db.oneskyit.com AE_DB_PORT=3306 # Port to expose on the host system if running a local MariaDB container -AE_DB_EXTERNAL_PORT=3306 +AE_DB_EXTERNAL_PORT=32768 # Database credentials AE_DB_NAME=aether_dev AE_DB_USERNAME=aether_dev AE_DB_PASSWORD=XXXX -AE_DB_ROOT_PASSWORD=XXXX # Connection Tuning AE_DB_CONNECTION_TIMEOUT=7 @@ -100,9 +92,7 @@ AE_REDIS_PORT=6379 # ------------------------------------------------------------------------------ # API SETTINGS (FastAPI) # ------------------------------------------------------------------------------ -AE_API_ENV=development - -# Number of API container instances to run (Docker Compose Scaling) +# Number of API container instances to run (Docker Compose scaling) AE_API_REPLICAS=3 # Gunicorn / Uvicorn Tuning @@ -133,22 +123,17 @@ AE_SMTP_PASSWORD=XXXX # ------------------------------------------------------------------------------ # APP SETTINGS (SvelteKit) # ------------------------------------------------------------------------------ -AE_APP_ENV=development +# Build mode baked into the Docker image at build time (dev, test, prod) AE_APP_BUILD_MODE=dev AE_APP_REPLICAS=2 -# AE App (Node SvelteKit) Gateway Port for External Reverse Proxy -AE_APP_GATEWAY_PORT=3001 # ------------------------------------------------------------------------------ # SOURCE PATHS (Absolute paths on Host Machine) # ------------------------------------------------------------------------------ -# IMPORTANT: These paths must exist on the machine running Docker -# They are mounted into containers as volumes for real-time development - -# Project Source Code +# IMPORTANT: These paths must exist on the machine running Docker. +# They are mounted into containers as volumes for real-time development. AE_API_SRC=/home/scott/OSIT_dev/aether_api_fastapi AE_APP_SRC=/home/scott/OSIT_dev/aether_app_sveltekit -AE_FLASK_APP_SRC=/home/scott/OSIT_dev/aether_app_flask # Physical File Storage (Images, Documents, etc.) # NOTE: Shared between environments to ensure binary availability diff --git a/docker-compose.yml b/docker-compose.yml index 645d70c..e940483 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,7 +64,7 @@ services: mariadb: restart: always image: mariadb:10.11 - container_name: ae_mariadb_dev + container_name: ${CONTAINER_MARIADB:-ae_mariadb_dev} profiles: ["database"] networks: - shared @@ -96,7 +96,7 @@ services: phpmyadmin: restart: always image: phpmyadmin/phpmyadmin - container_name: ae_pma_dev + container_name: ${CONTAINER_PMA:-ae_pma_dev} profiles: ["database"] networks: - shared @@ -210,7 +210,7 @@ services: ae_ops: # ... (same as before) ... - container_name: ae_ops_dev + container_name: ${CONTAINER_AE_OPS:-ae_ops_dev} image: alpine:latest restart: always profiles: ["database"]