Handles submitting new and updating existing beatmaps to the osu! website.
This configuration permits full-stack integration testing with other local osu! services.
To run the project in this configuration, you must have a configured osu-web
instance.
Additionally, to test beatmap downloads, you may want to set up a local beatmap mirror; see osu-beatmap-mirror-docker-runtime
for more information.
- Set up a client key that will be used to identify users. It should be the same client key that the osu!(lazer) client uses to communicate with
osu-web
. - In
launchSettings.json
, in thefullstack
configuration, set the following environment variables:- Set
JWT_VALID_AUDIENCE
to the client ID assigned to the key created in step (1). - Set
LOCAL_BEATMAP_STORAGE_PATH
to a directory where submitted beatmaps should be placed.
- Set
- Copy the
osu-web
OAuth public key to theosu.Server.BeatmapSubmission
project root:$ cp osu-web/storage/oauth-public.key osu-server-beatmap-submission/osu.Server.BeatmapSubmission/oauth-public.key
- Start the project in the
fullstack
configuration. - The application will start at http://localhost:5089.
- When interacting with endpoints which require authorisation, every request must include an
Authorization: Bearer <TOKEN>
header. That token must be a token issued byosu-web
for the client key set up in step (1).
- When interacting with endpoints which require authorisation, every request must include an
For advanced testing purposes.
This project supports three environment setups.
The choice of the environment is steered by the ASPNETCORE_ENVIRONMENT
environment variable.
Depending on environment, the configuration & config requirements change slightly.
ASPNETCORE_ENVIRONMENT=Development
:- Developer exception pages & API docs (
/api-docs
) are enabled. - Sentry & Datadog integrations are optional.
- Developer exception pages & API docs (
ASPNETCORE_ENVIRONMENT=Staging
:- Developer exception pages & API docs are disabled.
- Sentry integration is mandatory.
- Datadog integration is optional.
ASPNETCORE_ENVIRONMENT=Production
:- Developer exception pages & API docs are disabled.
- Sentry & Datadog integrations are mandatory.
Envvar name | Description | Mandatory? | Default value |
---|---|---|---|
DB_HOST |
Hostname under which the osu-web MySQL instance can be found. |
❌ No | localhost |
DB_PORT |
Port under which the osu-web MySQL instance can be found. |
❌ No | 3306 |
DB_USER |
Username to use when logging into the osu-web MySQL instance. |
❌ No | root |
DB_PASS |
Password to use when logging into the osu-web MySQL instance. |
❌ No | "" |
DB_NAME |
Name of database to use on the indicated MySQL instance. | ❌ No | osu |
JWT_VALID_AUDIENCE |
The value of the aud claim to use when validating incoming JWTs. Should be set to the client ID assigned to osu! in the osu-web target deploy. |
✔️ Yes | None |
BEATMAP_STORAGE_TYPE |
Which type of beatmap storage to use. Valid values are local and s3 . |
✔️ Yes | None |
LOCAL_BEATMAP_STORAGE_PATH |
The path of a directory where the submitted beatmaps should reside. | BEATMAP_STORAGE_TYPE=local |
None |
S3_ACCESS_KEY |
A valid Amazon S3 access key ID. | ⚠ If BEATMAP_STORAGE_TYPE=s3 |
None |
S3_SECRET_KEY |
The secret key corresponding to the S3_ACCESS_KEY . |
⚠ If BEATMAP_STORAGE_TYPE=s3 |
None |
S3_CENTRAL_BUCKET_NAME |
The name of the S3 bucket to use for storing beatmap packages and versioned files. | ⚠ If BEATMAP_STORAGE_TYPE=s3 |
None |
S3_BEATMAPS_BUCKET_NAME |
The name of the S3 bucket to use for storing .osu beatmap files. | ⚠ If BEATMAP_STORAGE_TYPE=s3 |
None |
LEGACY_IO_DOMAIN |
The root domain to which legacy IO requests should be directed to. | ✔️ Yes | None |
SHARED_INTEROP_SECRET |
The interop secret used for legacy IO requests. Value should match same environment variable in target osu-web instance. |
✔️ Yes | None |
PURGE_BEATMAP_MIRROR_CACHES |
Whether to request that beatmap mirror caches should be purged when a beatmap is updated. Set to 0 to disable. Turning this off is useful in configurations where the beatmap mirror cache is the same directory as LOCAL_BEATMAP_STORAGE_PATH . |
❌ No | 1 |
SENTRY_DSN |
A valid Sentry DSN to use for logging application events. | ⚠ In staging & production environment | None |
DD_AGENT_HOST |
A hostname pointing to a Datadog agent instance to which metrics should be reported. | ⚠ In production environment | None |