feat: backup

This commit is contained in:
2025-11-23 19:32:22 +08:00
parent c41ef094ea
commit 070fe1b416
6 changed files with 322 additions and 15 deletions

32
.env.example Normal file
View File

@@ -0,0 +1,32 @@
# Database Configuration
DB_HOST=db
DB_PORT=3306
DB_USER=nysoure
DB_PASSWORD=your_secure_password_here
DB_NAME=nysoure
MYSQL_ROOT_PASSWORD=your_secure_root_password_here
MYSQL_DATABASE=nysoure
MYSQL_USER=nysoure
MYSQL_PASSWORD=your_secure_password_here
# Redis Configuration
REDIS_HOST=redis
REDIS_PORT=6379
# Application Configuration
BANNED_REDIRECT_DOMAINS=example.com,example.org
ALLOWED_URL_REGEXPS=
# Backup Configuration
# Object storage configuration (S3-compatible)
S3_ENDPOINT=https://s3.amazonaws.com
S3_BUCKET=nysoure-backups
S3_ACCESS_KEY=your_access_key_here
S3_SECRET_KEY=your_secret_key_here
S3_REGION=us-east-1
# Backup schedule (cron format) - default: daily at 2 AM
BACKUP_SCHEDULE=0 2 * * *
# Retention policy (days)
BACKUP_RETENTION_DAYS=30