Prerequisites
- A Heroku account with container registry access
- The Heroku CLI installed
How it works
Heroku dynos have ephemeral filesystems: any files written to disk are lost when the dyno restarts. This deployment configures Compiler to:- Store repository metadata in Heroku Postgres (persistent)
- Clone repositories on demand to
/tmp/repos(ephemeral) - Automatically re-clone missing repositories when needed
Setup
1
Create a wrapper repository
Create a new repository with the following And a
heroku.yml:heroku.yml
Dockerfile that pulls the Compiler image:Dockerfile
2
Create the Heroku app
3
Add Heroku Postgres
DATABASE_URL environment variable automatically. Heroku Postgres requires SSL, so enable it:4
Add Redis
Redis is required: the app refuses to start without
REDIS_URL. It holds resumable stream state so a client can reconnect to an in-progress response.5
Configure environment variables
6
Deploy
Environment variables
The AI provider (Anthropic API or AWS Bedrock) and GitHub App credentials are configured through the onboarding flow, not as environment variables.
Behavior on dyno restart
When a Heroku dyno restarts:- All cloned repositories in
/tmp/reposare lost - Repository metadata remains in Heroku Postgres
- The server starts immediately
- When a user loads the app, a sync gate detects missing repositories and triggers re-cloning
- The user sees a loading screen until their repositories are ready
Performance considerations
On eco dynos, the app sleeps after 30 minutes of inactivity. Waking up triggers a full restart, so repositories are re-cloned on the first page load.
Updating
If the upstreamDockerfile changed, pull it first, then push: