{"id":19777172,"url":"https://github.com/ppy/osu-notification-server","last_synced_at":"2025-04-30T19:31:32.740Z","repository":{"id":34606878,"uuid":"173668899","full_name":"ppy/osu-notification-server","owner":"ppy","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-04T08:50:45.000Z","size":240,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T09:33:22.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T03:41:52.000Z","updated_at":"2025-04-04T08:50:49.000Z","dependencies_parsed_at":"2024-01-29T09:46:50.625Z","dependency_job_id":"2d50c7ef-2f40-4170-a540-e3f2646535c4","html_url":"https://github.com/ppy/osu-notification-server","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-notification-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-notification-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-notification-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-notification-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppy","download_url":"https://codeload.github.com/ppy/osu-notification-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769351,"owners_count":21640887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T05:23:28.811Z","updated_at":"2025-04-30T19:31:32.324Z","avatar_url":"https://github.com/ppy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osu!notification server\n\n## Requirements\n\n- node 10+\n\n## Setup\n\nEither set up environment variables or copy/symlink following files from osu!web project to this project's root directory:\n- `oauth-public.key` (if not using environment variable; located in `storage` in osu!web)\n- `.env`\n\nConfigurations:\n\n- Only through environment variable:\n  - `WEBSOCKET_BASEDIR`: set if you need to explicitly specify path to the files above.\n  - `APP_ENV`: defaults to `development`. The `.env.${APP_ENV}` file will be loaded first before `.env`.\n- Either environment variable or in `.env` files:\n  - Refer to `src/config.ts`.\n\nLastly, osu!web needs to be configured to use redis-based session.\n\n## Run\n\n1. `yarn`\n2. `yarn build`\n3. `yarn serve`\n\n## Development\n\nWatch and rebuild automatically with `yarn watch`. The server doesn't auto-restart though.\n\n### Code linting (style check)\n\nRun `yarn lint --fix` and additionally do manual fixes if needed.\n\n### Testing\n\nTo be added.\n\n## Docker\n\nTo build:\n\n    # repository should be username/repository when using docker hub for convenient push\n    docker build --tag \u003crepository\u003e:\u003ctag\u003e .\n\nTo run, the following items need to be passed to the container:\n- environment variables: either directly using docker command or bind mount to `/app/.env`\n- oauth public key: bind mount to `/app/oauth-public.key`\n- listening port: for the host\n\nMake sure the files are globally readable as the container process runs as limited privilege user\n\nExample:\n\n    docker run \\\n      --rm \\\n      --publish 2345:2345 \\\n      -v /path/to/.env:/app/.env \\\n      -v /path/to/oauth-public.key:/app/oauth-public.key \\\n      -e NOTIFICATION_REDIS_HOST=redis \\\n      ppy/osu-notification-server:latest\n\n## Deployment considerations\n\n### Multiple cores\n\nThe process is single-threaded. Launch multiple containers to handle more connections.\n\n### Connection limit\n\nEach process is known to be able to handle over 3000 connections. Make sure to increase file descriptor limit for the container process (`--ulimit nofile=10000` option in docker) otherwise it won't be able to accept enough connections.\n\n### Process monitoring\n\nThere's currently no error handling. Any errors will stop the process. Make sure to always restart on exit.\n\n### Reverse proxy\n\nThe server is supposed to be deployed behind a reverse proxy like nginx. Following is the proxying setting usually used for nginx:\n\n    proxy_pass http://notification-server;\n    proxy_set_header X-Forwarded-For $remote_addr;\n    proxy_buffering off;\n    proxy_redirect off;\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection $connection_upgrade;\n    tcp_nodelay on;\n\nEspecially make sure to not forward `X-Forwarded-For` from external source because it's used for identifying connecting IP address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppy%2Fosu-notification-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppy%2Fosu-notification-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppy%2Fosu-notification-server/lists"}