mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
- Updated database settings to use dj_database_url for environment-based configuration - Added dj-database-url dependency - Configured PostGIS backend for spatial data support - Set default DATABASE_URL for production PostgreSQL connection
321 lines
9.0 KiB
Bash
321 lines
9.0 KiB
Bash
# ThrillWiki Deployment Service Environment Configuration
|
|
# This file is generated automatically by the deployment system and integrates
|
|
# with deployment presets for consistent configuration across environments.
|
|
#
|
|
# Security Note: This file should have restricted permissions (600) as it may contain
|
|
# sensitive information like GitHub Personal Access Tokens
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# PROJECT CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Base project directory
|
|
PROJECT_DIR=/home/thrillwiki/thrillwiki
|
|
|
|
# Service name for systemd integration
|
|
SERVICE_NAME=thrillwiki-deployment
|
|
|
|
# Deployment mode (automated|manual|timer)
|
|
DEPLOYMENT_MODE=automated
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# GITHUB REPOSITORY CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# GitHub repository remote name
|
|
GITHUB_REPO=origin
|
|
|
|
# Branch to pull from
|
|
GITHUB_BRANCH=main
|
|
|
|
# GitHub Personal Access Token (PAT) - Required for private repositories
|
|
# This will be populated automatically during deployment setup
|
|
# GITHUB_TOKEN=
|
|
|
|
# GitHub token file location (alternative to GITHUB_TOKEN)
|
|
GITHUB_TOKEN_FILE=/home/thrillwiki/thrillwiki/.github-pat
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# DEPLOYMENT PRESET CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Deployment preset (dev, prod, demo, testing)
|
|
# This determines the automation timing and behavior
|
|
DEPLOYMENT_PRESET=dev
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# AUTOMATION TIMING CONFIGURATION (Preset-based)
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Repository pull interval in seconds
|
|
# Default values by preset:
|
|
# - dev: 60s (1 minute)
|
|
# - prod: 300s (5 minutes)
|
|
# - demo: 120s (2 minutes)
|
|
# - testing: 180s (3 minutes)
|
|
PULL_INTERVAL=60
|
|
|
|
# Health check interval in seconds
|
|
HEALTH_CHECK_INTERVAL=30
|
|
|
|
# Server startup timeout in seconds
|
|
STARTUP_TIMEOUT=120
|
|
|
|
# Restart delay after failure in seconds
|
|
RESTART_DELAY=10
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# DEPLOYMENT BEHAVIOR CONFIGURATION (Preset-based)
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Debug mode for troubleshooting
|
|
DEBUG_MODE=true
|
|
|
|
# Enable automatic dependency updates
|
|
AUTO_UPDATE_DEPENDENCIES=true
|
|
|
|
# Enable automatic migrations on code changes
|
|
AUTO_MIGRATE=true
|
|
|
|
# Enable automatic static file collection
|
|
AUTO_COLLECTSTATIC=true
|
|
|
|
# Log level (DEBUG|INFO|WARNING|ERROR)
|
|
LOG_LEVEL=DEBUG
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# SECURITY CONFIGURATION (Preset-based)
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Django debug mode
|
|
DJANGO_DEBUG=true
|
|
|
|
# SSL required
|
|
SSL_REQUIRED=false
|
|
|
|
# CORS allowed
|
|
CORS_ALLOWED=true
|
|
|
|
# Allowed hosts (comma-separated)
|
|
ALLOWED_HOSTS=*
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# LOGGING CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Log directory
|
|
LOG_DIR=/home/thrillwiki/thrillwiki/logs
|
|
|
|
# Log file path for deployment automation
|
|
LOG_[AWS-SECRET-REMOVED]ployment-automation.log
|
|
|
|
# Maximum log file size in bytes (10MB default)
|
|
MAX_LOG_SIZE=10485760
|
|
|
|
# Lock file location to prevent multiple instances
|
|
LOCK_FILE=/tmp/thrillwiki-deployment.lock
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# DEVELOPMENT SERVER CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Server host address
|
|
SERVER_HOST=0.0.0.0
|
|
|
|
# Server port
|
|
SERVER_PORT=8000
|
|
|
|
# Health check URL
|
|
HEALTH_CHECK_URL=http://localhost:8000/
|
|
|
|
# Health check timeout in seconds
|
|
HEALTH_CHECK_TIMEOUT=30
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# DJANGO CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Django settings module
|
|
DJANGO_SETTINGS_MODULE=thrillwiki.settings
|
|
|
|
# Python path
|
|
PYTHONPATH=/home/thrillwiki/thrillwiki
|
|
|
|
# UV executable path
|
|
UV_EXECUTABLE=/home/thrillwiki/.local/bin/uv
|
|
|
|
# Django development server command (following .clinerules)
|
|
DJANGO_RUNSERVER_CMD=lsof -ti :8000 | xargs kill -9; find . -type d -name '__pycache__' -exec rm -r {} +; uv run manage.py tailwind runserver
|
|
|
|
# Enable development server auto-cleanup
|
|
AUTO_CLEANUP_PROCESSES=true
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# SYSTEMD SERVICE CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Service user and group
|
|
SERVICE_USER=thrillwiki
|
|
SERVICE_GROUP=thrillwiki
|
|
|
|
# Service working directory
|
|
SERVICE_WORKING_DIR=/home/thrillwiki/thrillwiki
|
|
|
|
# Service restart policy
|
|
SERVICE_RESTART=always
|
|
SERVICE_RESTART_SEC=30
|
|
|
|
# Service timeout configuration
|
|
SERVICE_TIMEOUT_START=180
|
|
SERVICE_TIMEOUT_STOP=120
|
|
|
|
# Maximum restart attempts
|
|
MAX_RESTART_ATTEMPTS=3
|
|
|
|
# Restart cooldown period
|
|
RESTART_COOLDOWN=300
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# SMART DEPLOYMENT TIMER CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Timer service configuration
|
|
TIMER_ON_BOOT_SEC=5min
|
|
TIMER_ON_UNIT_ACTIVE_SEC=5min
|
|
TIMER_RANDOMIZED_DELAY_SEC=30sec
|
|
TIMER_PERSISTENT=true
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# MONITORING AND HEALTH CHECKS
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Enable system resource monitoring
|
|
MONITOR_RESOURCES=true
|
|
|
|
# Memory usage threshold for warnings (in MB)
|
|
MEMORY_WARNING_THRESHOLD=512
|
|
|
|
# CPU usage threshold for warnings (percentage)
|
|
CPU_WARNING_THRESHOLD=70
|
|
|
|
# Disk usage threshold for warnings (percentage)
|
|
DISK_WARNING_THRESHOLD=85
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# INTEGRATION SETTINGS
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Integration with other services
|
|
WEBHOOK_INTEGRATION=false
|
|
|
|
# Email notifications for critical failures
|
|
# NOTIFICATION_EMAIL=
|
|
|
|
# Maximum consecutive failures before alerting
|
|
MAX_CONSECUTIVE_FAILURES=5
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# ADVANCED CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# Enable verbose logging
|
|
VERBOSE_LOGGING=true
|
|
|
|
# Custom git remote URL (overrides GITHUB_REPO if set)
|
|
# CUSTOM_GIT_REMOTE=
|
|
|
|
# GitHub authentication method (token|ssh|https)
|
|
GITHUB_AUTH_METHOD=token
|
|
|
|
# SSH key path for git operations (when using ssh auth method)
|
|
# SSH_KEY_PATH=/home/thrillwiki/.ssh/***REMOVED***
|
|
|
|
# Git user configuration for commits
|
|
GIT_USER_NAME="ThrillWiki Deployment"
|
|
GIT_USER_EMAIL="deployment@thrillwiki.local"
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# ENVIRONMENT AND SYSTEM CONFIGURATION
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# System PATH additions (for UV and other tools)
|
|
ADDITIONAL_PATH=/home/thrillwiki/.local/bin:/home/thrillwiki/.cargo/bin
|
|
|
|
# Python environment configuration
|
|
PYTHON_EXECUTABLE=python3
|
|
|
|
# Service state and runtime directories
|
|
SERVICE_LOGS_DIR=/var/log/thrillwiki-deployment
|
|
SERVICE_STATE_DIR=/var/lib/thrillwiki-deployment
|
|
SERVICE_RUNTIME_DIR=/run/thrillwiki-deployment
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# PRESET-SPECIFIC OVERRIDES
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# The following section contains preset-specific configurations that override
|
|
# the defaults above based on the DEPLOYMENT_PRESET value.
|
|
# These are automatically applied by the deployment system.
|
|
|
|
# Development preset overrides (applied when DEPLOYMENT_PRESET=dev)
|
|
# PULL_INTERVAL=60
|
|
# HEALTH_CHECK_INTERVAL=30
|
|
# DEBUG_MODE=true
|
|
# AUTO_MIGRATE=true
|
|
# AUTO_UPDATE_DEPENDENCIES=true
|
|
# LOG_LEVEL=DEBUG
|
|
# SSL_REQUIRED=false
|
|
# CORS_ALLOWED=true
|
|
# DJANGO_DEBUG=true
|
|
# ALLOWED_HOSTS=*
|
|
|
|
# Production preset overrides (applied when DEPLOYMENT_PRESET=prod)
|
|
# PULL_INTERVAL=300
|
|
# HEALTH_CHECK_INTERVAL=60
|
|
# DEBUG_MODE=false
|
|
# AUTO_MIGRATE=true
|
|
# AUTO_UPDATE_DEPENDENCIES=false
|
|
# LOG_LEVEL=WARNING
|
|
# SSL_REQUIRED=true
|
|
# CORS_ALLOWED=false
|
|
# DJANGO_DEBUG=false
|
|
# ALLOWED_HOSTS=production-host
|
|
|
|
# Demo preset overrides (applied when DEPLOYMENT_PRESET=demo)
|
|
# PULL_INTERVAL=120
|
|
# HEALTH_CHECK_INTERVAL=45
|
|
# DEBUG_MODE=false
|
|
# AUTO_MIGRATE=true
|
|
# AUTO_UPDATE_DEPENDENCIES=true
|
|
# LOG_LEVEL=INFO
|
|
# SSL_REQUIRED=false
|
|
# CORS_ALLOWED=true
|
|
# DJANGO_DEBUG=false
|
|
# ALLOWED_HOSTS=demo-host
|
|
|
|
# Testing preset overrides (applied when DEPLOYMENT_PRESET=testing)
|
|
# PULL_INTERVAL=180
|
|
# HEALTH_CHECK_INTERVAL=30
|
|
# DEBUG_MODE=true
|
|
# AUTO_MIGRATE=true
|
|
# AUTO_UPDATE_DEPENDENCIES=true
|
|
# LOG_LEVEL=DEBUG
|
|
# SSL_REQUIRED=false
|
|
# CORS_ALLOWED=true
|
|
# DJANGO_DEBUG=true
|
|
# ALLOWED_HOSTS=test-host
|
|
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
# INSTALLATION AND SECURITY NOTES
|
|
# [AWS-SECRET-REMOVED]====================================
|
|
|
|
# For security, ensure only the thrillwiki user can read this file:
|
|
# sudo chown thrillwiki:thrillwiki thrillwiki-deployment***REMOVED***
|
|
# sudo chmod 600 thrillwiki-deployment***REMOVED***
|
|
|
|
# Service management commands:
|
|
# sudo systemctl enable thrillwiki-deployment.service
|
|
# sudo systemctl enable thrillwiki-smart-deploy.timer
|
|
# sudo systemctl start thrillwiki-deployment.service
|
|
# sudo systemctl start thrillwiki-smart-deploy.timer
|
|
# sudo systemctl status thrillwiki-deployment.service
|
|
# sudo journalctl -u thrillwiki-deployment -f |