# 摄影作品集项目环境变量配置 # ================================ # 数据库配置 (连接到现有的 PostgreSQL 服务) # ================================ DB_HOST=localhost DB_PORT=5432 DB_NAME=photography DB_USER=postgres DB_PASSWORD=your_existing_postgres_password # ================================ # Redis 配置 (连接到现有的 Redis 服务) # ================================ REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=your_existing_redis_password # ================================ # JWT 认证配置 # ================================ JWT_SECRET=your_jwt_secret_key_here_at_least_32_characters JWT_EXPIRES_IN=24h # ================================ # 服务器配置 # ================================ PORT=8080 GIN_MODE=release CORS_ORIGINS=https://photography.iriver.top,https://admin.photography.iriver.top # ================================ # 文件存储配置 # ================================ STORAGE_TYPE=local STORAGE_PATH=/app/uploads MAX_UPLOAD_SIZE=10MB # AWS S3 配置 (如果使用 S3 存储) # AWS_REGION=us-east-1 # AWS_BUCKET=photography-bucket # AWS_ACCESS_KEY_ID=your_access_key # AWS_SECRET_ACCESS_KEY=your_secret_key # ================================ # 日志配置 # ================================ LOG_LEVEL=info LOG_FORMAT=json # ================================ # 邮件配置 (用于通知) # ================================ SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your_email@gmail.com SMTP_PASSWORD=your_app_password SMTP_FROM=noreply@photography.iriver.top # ================================ # 监控配置 # ================================ ENABLE_METRICS=true METRICS_PORT=9090 # ================================ # 安全配置 # ================================ RATE_LIMIT=100 RATE_LIMIT_WINDOW=1h ENABLE_CSRF=true CSRF_SECRET=your_csrf_secret_here # ================================ # 缓存配置 # ================================ CACHE_TTL=3600 ENABLE_CACHE=true # ================================ # 部署配置 # ================================ ENVIRONMENT=production TZ=Asia/Shanghai