TRUECOURSE_MODE:
Leave
TRUECOURSE_MODE unset for hosted. Any value other than local or hosted stops the server at boot.
Requirements
Run it locally
pnpm dev serves the web app on http://localhost:3000 and the server on port 3001. The server reads the .env file at the root of the checkout.
Local mode needs two variables:
Generate a secret with:
Deploy for a team
Hosted mode needsDATABASE_URL and TRUECOURSE_SECRET_KEY, plus WorkOS:
A workspace is the signed-in session’s WorkOS organization. The server refuses any request that has no session. Invite people from Settings › Members.
Connect GitHub
Repositories come in through a GitHub App. Set all four variables:
Without them the server still boots, and its GitHub routes answer 503 with the names of the missing variables.
On the App’s settings page, point the webhook URL at
/api/github/webhook on a public address, and the setup URL at /api/github/setup. The App acts on installation, installation_repositories and push events. A push to a repository’s default branch syncs the Repository source that reads it.
Connect accounts from Settings › Repositories, then connect repositories from Code. GitLab is listed there as coming soon.
The container image
TheDockerfile builds the server and the web app into one image. The server serves the web app and listens on PORT, which is 3001 in the image. Its runtime directory is /data. Postgres stays outside the image.
Optional variables
Model, concurrency and timeout variables are on Models & environment.
Editions
The open edition is everything except three enterprise features: document Connections, repository providers beyond GitHub and GitLab, and more than one workspace. They live in theee/ directory under their own license. A build decides its edition when it is built: when the build includes ee/, the container image starts the enterprise edition.
Next steps
Quickstart
Connect a repository and follow the first flows to a result.
Storage
What Postgres holds, and where runs keep their scratch.