* feat(config): make `performance_server` as default calculator * deploy(docker): use osu-performance-server * docs(readme): add ruleset download instructions * chore(dev): update development environment * feat(dev): update development environment setup and service startup order * fix(deps): move `rosu-pp-py` to `project.optional-dependencies` * feat(beatmap): handle deleted beatmaps * feat(performance-server): add a long timeout for calculation * feat(recalculate): enhance CLI arguments for performance, leaderboard, and rating recalculations with CSV output support * fix(recalculate): resolve reviews * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(beatmapsync): resolve too long line --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
93 lines
2.2 KiB
YAML
93 lines
2.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
devcontainer:
|
|
image: mcr.microsoft.com/devcontainers/python:3.13
|
|
volumes:
|
|
- ../..:/workspaces:cached
|
|
- ~/.ssh:/home/vscode/.ssh:ro
|
|
command: sleep infinity
|
|
networks:
|
|
- devcontainer-network
|
|
depends_on:
|
|
- mysql
|
|
- redis
|
|
- nginx
|
|
environment:
|
|
# Python/FastAPI 环境变量
|
|
MYSQL_ROOT_PASSWORD: password
|
|
MYSQL_DATABASE: osu_api
|
|
MYSQL_USER: osu_api
|
|
MYSQL_PASSWORD: password
|
|
REDIS_URL: redis://redis:6379/0
|
|
OSU_CLIENT_ID: "5"
|
|
OSU_CLIENT_SECRET: "FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk"
|
|
CALCULATOR_CONFIG: '{"server_url":"http://localhost:8090"}'
|
|
|
|
# Spectator Server 环境变量
|
|
SAVE_REPLAYS: "0"
|
|
REPLAY_UPLOAD_THREADS: "1"
|
|
TRACK_BUILD_USER_COUNTS: "1"
|
|
SERVER_PORT: "8086"
|
|
REDIS_HOST: "redis"
|
|
DD_AGENT_HOST: "localhost"
|
|
SHARED_INTEROP_DOMAIN: "http://localhost:8000"
|
|
SHARED_INTEROP_SECRET: "dev-interop-secret"
|
|
SENTRY_DSN: "https://5840d8cb8d2b4d238369443bedef1d74@glitchtip.g0v0.top/4"
|
|
USE_LEGACY_RSA_AUTH: "0"
|
|
# .NET 环境变量
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
|
DOTNET_NOLOGO: "1"
|
|
|
|
RULESETS_PATH: "/workspaces/osu_lazer_api/rulesets"
|
|
|
|
mysql:
|
|
image: mysql:8.0
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: password
|
|
MYSQL_DATABASE: osu_api
|
|
MYSQL_USER: osu_api
|
|
MYSQL_PASSWORD: password
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- mysql-data:/var/lib/mysql
|
|
- ../mysql-init:/docker-entrypoint-initdb.d:cached
|
|
networks:
|
|
- devcontainer-network
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- devcontainer-network
|
|
command: redis-server --appendonly yes
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "8080:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
networks:
|
|
- devcontainer-network
|
|
depends_on:
|
|
- mysql
|
|
- redis
|
|
|
|
networks:
|
|
devcontainer-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
mysql-data:
|
|
redis-data:
|