137 lines
4.2 KiB
Plaintext
137 lines
4.2 KiB
Plaintext
# ============================================================================
|
|
# Environment Configuration for Recticel Quality Application
|
|
# Copy this file to .env and customize for your deployment
|
|
# ============================================================================
|
|
|
|
# ============================================================================
|
|
# DATABASE CONFIGURATION
|
|
# ============================================================================
|
|
DB_HOST=db
|
|
DB_PORT=3306
|
|
DB_NAME=trasabilitate
|
|
DB_USER=trasabilitate
|
|
DB_PASSWORD=Initial01!
|
|
|
|
# MySQL/MariaDB root password
|
|
MYSQL_ROOT_PASSWORD=rootpassword
|
|
|
|
# Database performance tuning
|
|
MYSQL_BUFFER_POOL=256M
|
|
MYSQL_MAX_CONNECTIONS=150
|
|
|
|
# Database connection retry settings
|
|
DB_MAX_RETRIES=60
|
|
DB_RETRY_INTERVAL=2
|
|
|
|
# Data persistence paths
|
|
DB_DATA_PATH=/srv/quality_app/mariadb
|
|
LOGS_PATH=/srv/quality_app/logs
|
|
INSTANCE_PATH=/srv/quality_app/py_app/instance
|
|
BACKUP_PATH=/srv/quality_app/backups
|
|
|
|
# ============================================================================
|
|
# APPLICATION CONFIGURATION
|
|
# ============================================================================
|
|
# Flask environment (development, production)
|
|
FLASK_ENV=production
|
|
|
|
# Secret key for Flask sessions (CHANGE IN PRODUCTION!)
|
|
SECRET_KEY=change-this-in-production
|
|
|
|
# Application port
|
|
APP_PORT=8781
|
|
|
|
# ============================================================================
|
|
# GUNICORN CONFIGURATION
|
|
# ============================================================================
|
|
# Number of worker processes (default: CPU cores * 2 + 1)
|
|
# GUNICORN_WORKERS=5
|
|
|
|
# Worker class (sync, gevent, gthread)
|
|
GUNICORN_WORKER_CLASS=sync
|
|
|
|
# Request timeout in seconds (increased for large database operations)
|
|
GUNICORN_TIMEOUT=1800
|
|
|
|
# Bind address
|
|
GUNICORN_BIND=0.0.0.0:8781
|
|
|
|
# Log level (debug, info, warning, error, critical)
|
|
GUNICORN_LOG_LEVEL=info
|
|
|
|
# Preload application
|
|
GUNICORN_PRELOAD_APP=true
|
|
|
|
# Max requests per worker before restart
|
|
GUNICORN_MAX_REQUESTS=1000
|
|
|
|
# For Docker stdout/stderr logging, uncomment:
|
|
# GUNICORN_ACCESS_LOG=-
|
|
# GUNICORN_ERROR_LOG=-
|
|
|
|
# ============================================================================
|
|
# INITIALIZATION FLAGS
|
|
# ============================================================================
|
|
# Initialize database schema on first run (set to false after first deployment)
|
|
INIT_DB=false
|
|
|
|
# Seed database with default data (set to false after first deployment)
|
|
SEED_DB=false
|
|
|
|
# Continue on database initialization errors
|
|
IGNORE_DB_INIT_ERRORS=false
|
|
|
|
# Continue on seeding errors
|
|
IGNORE_SEED_ERRORS=false
|
|
|
|
# Skip application health check
|
|
SKIP_HEALTH_CHECK=false
|
|
|
|
# ============================================================================
|
|
# LOCALIZATION
|
|
# ============================================================================
|
|
TZ=Europe/Bucharest
|
|
LANG=en_US.UTF-8
|
|
|
|
# ============================================================================
|
|
# DOCKER BUILD ARGUMENTS
|
|
# ============================================================================
|
|
VERSION=1.0.0
|
|
BUILD_DATE=
|
|
VCS_REF=
|
|
|
|
# ============================================================================
|
|
# NETWORK CONFIGURATION
|
|
# ============================================================================
|
|
NETWORK_SUBNET=172.20.0.0/16
|
|
|
|
# ============================================================================
|
|
# RESOURCE LIMITS
|
|
# ============================================================================
|
|
# Database resource limits
|
|
DB_CPU_LIMIT=2.0
|
|
DB_CPU_RESERVATION=0.5
|
|
DB_MEMORY_LIMIT=1G
|
|
DB_MEMORY_RESERVATION=256M
|
|
|
|
# Application resource limits
|
|
APP_CPU_LIMIT=2.0
|
|
APP_CPU_RESERVATION=0.5
|
|
APP_MEMORY_LIMIT=1G
|
|
APP_MEMORY_RESERVATION=256M
|
|
|
|
# Logging configuration
|
|
LOG_MAX_SIZE=10m
|
|
LOG_MAX_FILES=5
|
|
DB_LOG_MAX_FILES=3
|
|
|
|
# ============================================================================
|
|
# NOTES:
|
|
# ============================================================================
|
|
# 1. Copy this file to .env in the same directory as docker-compose.yml
|
|
# 2. Customize the values for your environment
|
|
# 3. NEVER commit .env to version control
|
|
# 4. Add .env to .gitignore
|
|
# 5. For production, use strong passwords and secrets
|
|
# ============================================================================
|