Files
g0v0-server/.env.example
咕谷酱 6bcd8c1a21 Add asset proxy feature for resource URLs
Introduces asset proxy configuration and services to enable replacement of osu! resource URLs with custom domains. Updates API endpoints and caching services to process and rewrite resource URLs when asset proxy is enabled. Adds documentation and environment variables for asset proxy setup.
2025-08-22 22:03:51 +08:00

124 lines
3.1 KiB
Plaintext

# see https://github.com/GooGuTeam/g0v0-server/wiki/Configuration
# Database Settings
MYSQL_HOST="localhost"
MYSQL_PORT=3306
MYSQL_DATABASE="osu_api"
MYSQL_USER="osu_api"
MYSQL_PASSWORD="password"
MYSQL_ROOT_PASSWORD="password"
REDIS_URL="redis://127.0.0.1:6379/0"
# JWT Settings
# Use `openssl rand -hex 32` to generate a secure key
JWT_SECRET_KEY="your_jwt_secret_here"
ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES=1440
# OAuth Settings
OSU_CLIENT_ID=5
OSU_CLIENT_SECRET="FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk"
OSU_WEB_CLIENT_ID=6
# Use `openssl rand -hex 40` to generate a secure key
OSU_WEB_CLIENT_SECRET="your_osu_web_client_secret_here"
# Server Settings
HOST="0.0.0.0"
PORT=8000
DEBUG=false
CORS_URLS='[]'
SERVER_URL="http://localhost:8000"
FRONTEND_URL=
# SignalR Settings
SIGNALR_NEGOTIATE_TIMEOUT=30
SIGNALR_PING_INTERVAL=15
# Fetcher Settings
FETCHER_CLIENT_ID=""
FETCHER_CLIENT_SECRET=""
FETCHER_SCOPES="public"
# Logging Settings
LOG_LEVEL="INFO"
# Email Service Settings
ENABLE_EMAIL_VERIFICATION=false
SMTP_SERVER="localhost"
SMTP_PORT=587
SMTP_USERNAME=""
SMTP_PASSWORD=""
FROM_EMAIL="noreply@example.com"
FROM_NAME="osu! server"
# Sentry Configuration
SENTRY_DSN=
# New Relic Configuration
NEW_RELIC_ENVIRONMENT=
# GeoIP Configuration
MAXMIND_LICENSE_KEY=""
GEOIP_DEST_DIR="./geoip"
GEOIP_UPDATE_DAY=1
GEOIP_UPDATE_HOUR=2
# Game Settings
ENABLE_RX=false
ENABLE_AP=false
ENABLE_ALL_MODS_PP=false
ENABLE_SUPPORTER_FOR_ALL_USERS=false
ENABLE_ALL_BEATMAP_LEADERBOARD=false
ENABLE_ALL_BEATMAP_PP=false
SEASONAL_BACKGROUNDS='[]'
# Beatmap Cache Settings
ENABLE_BEATMAP_PRELOAD=true
BEATMAP_CACHE_EXPIRE_HOURS=24
# Ranking Cache Settings
ENABLE_RANKING_CACHE=true
RANKING_CACHE_EXPIRE_MINUTES=10
RANKING_CACHE_REFRESH_INTERVAL_MINUTES=10
RANKING_CACHE_MAX_PAGES=20
RANKING_CACHE_TOP_COUNTRIES=20
# User Cache Settings
ENABLE_USER_CACHE_PRELOAD=true
USER_CACHE_EXPIRE_SECONDS=300
USER_SCORES_CACHE_EXPIRE_SECONDS=60
USER_BEATMAPSETS_CACHE_EXPIRE_SECONDS=600
USER_CACHE_MAX_PRELOAD_USERS=200
USER_CACHE_CONCURRENT_LIMIT=10
# Anti-cheat Settings
SUSPICIOUS_SCORE_CHECK=true
BANNED_NAME='["mrekk", "vaxei", "btmc", "cookiezi", "peppy", "saragi", "chocomint"]'
# Storage Settings
# Supported storage services: local, r2, s3
STORAGE_SERVICE="local"
# Local Storage Settings (when STORAGE_SERVICE=local)
# STORAGE_SETTINGS='{"local_storage_path": "./storage"}'
# Cloudflare R2 Storage Settings (when STORAGE_SERVICE=r2)
# STORAGE_SETTINGS='{
# "r2_account_id": "your_cloudflare_r2_account_id",
# "r2_access_key_id": "your_r2_access_key_id",
# "r2_secret_access_key": "your_r2_secret_access_key",
# "r2_bucket_name": "your_r2_bucket_name",
# "r2_public_url_base": "https://your-custom-domain.com"
# }'
# AWS S3 Storage Settings (when STORAGE_SERVICE=s3)
# STORAGE_SETTINGS='{
# "s3_access_key_id": "your_aws_access_key_id",
# "s3_secret_access_key": "your_aws_secret_access_key",
# "s3_bucket_name": "your_s3_bucket_name",
# "s3_region_name": "us-east-1",
# "s3_public_url_base": "https://your-custom
# 启用资源代理功能
ENABLE_ASSET_PROXY=true
# 自定义资源域名
CUSTOM_ASSET_DOMAIN=assets-ppy.g0v0.top