Files
apocapoc-api/.env.example
david e9e7e9dbac Add automated backup system with SQLite VACUUM
- Implement backup package with SQLite VACUUM INTO for safe backups
- Add scheduler with configurable interval (default: 24h)
- Add retention policy with automatic cleanup (default: 7 days)
- Add optional gzip compression (~10x size reduction)
- Add comprehensive tests for backup creation and cleanup
- Integrate backup scheduler in main.go with graceful shutdown
- Add backup configuration variables (BACKUP_ENABLED, BACKUP_INTERVAL, BACKUP_RETENTION_DAYS, BACKUP_PATH, BACKUP_COMPRESS)
- Backups run automatically in background goroutine
- Coverage: backup package 52.7%
2025-12-05 00:17:37 +01:00

39 lines
768 B
Bash

DB_PATH=./data/apocapoc.db
PORT=8080
APP_URL=http://localhost:8080
JWT_SECRET=change-me-in-production
JWT_EXPIRY=1h
REFRESH_TOKEN_EXPIRY=7d
DEFAULT_TIMEZONE=UTC
# Email Configuration (optional - required for email features)
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
# Note: Escape $ signs with $$ (e.g., pa$word becomes pa$$word)
SMTP_PASSWORD=
SMTP_FROM=noreply@example.com
# Application Branding (optional - override support email if needed)
SUPPORT_EMAIL=contact@apocapoc.app
# Email Features
SEND_WELCOME_EMAIL=false
# Registration Control
REGISTRATION_MODE=open
# Logging Configuration
LOG_LEVEL=info
ENVIRONMENT=production
# Backup Configuration
BACKUP_ENABLED=false
BACKUP_INTERVAL=24h
BACKUP_RETENTION_DAYS=7
BACKUP_PATH=./data/backups
BACKUP_COMPRESS=true