Skip to content

Hosting Quickstart

Will White edited this page Aug 26, 2022 · 8 revisions

To run the Team Finder, you'll need to host an instance of the UI and API, and have access to a MongoDB (either self-hosted or managed). See our In-Depth Hosting Overview for details on how to do this if you've never hosted an application before.

You'll also need a Discord Application for the 'Login with Discord' functionality to work, and optionally a Discord Bot if you want to enable the back-up ping notification logic (for when a user cannot be directly messaged via Discord DMs).

Hosting the UI

The UI builds down to a static site by running npm run build.

It uses the following environment variables:

Required

  • VITE_API_URL (e.g. https://your-api.example.com), used to make API requests for data to/from the API
  • VITE_DISCORD_NAME (e.g. 'GMTK'), the name of your Discord community to use on the site
  • VITE_DISCORD_INVITE_URL (e.g. https://discord.gg/7Y7jsbEd), the invite URL to show users who aren't in your server
  • VITE_JAM_NAME (e.g. 'GMTK Game Jam 2022'), the name of your event
  • VITE_JAM_URL (e.g. https://itch.io/jam/gmtk-jam-2022), the event URL for people to join

Optional

  • VITE_SENTRY_DSN, used for UI monitoring if you have a Sentry.io account

Hosting the API

The API can be run from the ./api/Dockerfile as a Docker container.

It uses the following environment variables:

Required

  • API_URL (the same value as VITE_API_URL above), used internally during the 'Login with Discord' flow
  • UI_URL (e.g. https://your-ui.example.com), used internally during the 'Login with Discord' flow
  • DATABASE_URL (any value MongoDB connection string, in the format mongodb://username:password@host/admin or mongodb+srv://username:password@host/admin?...)
  • ADMIN_DISCORD_IDS, a comma-separated list of the Discord IDs for admin-level users of the system (admin users can remove posts and ban users from your Team Finder)
  • DISCORD_CLIENT_ID, the client ID of your Discord application (required for the 'Login with Discord' flow)
  • DISCORD_CLIENT_SECRET, the client secret of your Discord application (required for the 'Login with Discord' flow)

For more information on setting up a Discord Application, see https://discord.com/developers/docs/game-sdk/applications

Optional

  • DISCORD_BOT_TOKEN, if you want to enable the 'Discord ping' feature as a fallback mechanism for allowing users to get in touch if the 'Message with Discord' feature doesn't work