Prerequisites
- A container platform that can pull public images from
ghcr.io - A domain or subdomain for Compiler, such as
compiler.yourdomain.com, and a TLS certificate for it - A way to provision PostgreSQL and Redis, either managed services or your own
Step 1: Provision PostgreSQL and Redis
PostgreSQL 16 or later
PostgreSQL 16 or later
Create an empty database that Compiler owns. Managed services such as Amazon RDS, Aurora PostgreSQL, Cloud SQL and Azure Database for PostgreSQL work.The database user must be able to create tables and the
pg_trgm extension, which the first migration adds. On RDS, the master user can.Redis 7 or later
Redis 7 or later
Managed services such as Amazon ElastiCache and Memorystore work. Compiler refuses to start without Redis.
rediss:// URL when Redis requires TLS.
Step 2: Create the secrets
Generate an encryption key for stored credentials:Step 3: Run the container
Run one replica of the image with the secrets from step 2 and these settings:
The image is public and built for
linux/amd64 and linux/arm64, so no registry credentials are needed. The other environment variables are optional.
Choosing an image tag
Choosing an image tag
main is the latest build; pull it again to update. Every build also has a sha-<commit> tag. Use one to pin a version and roll back predictably. Settings in Compiler shows the commit your instance is running.Why set PORT
Why set PORT
Without
PORT, the app uses 3000 when that port is free and picks another when it isn’t. Setting it keeps the port your platform routes to fixed.Choosing a volume for /repos
Choosing a volume for /repos
Compiler clones the repositories it reads into
/repos. The contents can be lost safely: Compiler re-clones any missing repository the next time someone loads the app, and shows a loading screen until it’s ready.Ephemeral storage, such as an emptyDir volume or ECS task storage, works. A persistent volume avoids re-cloning after every restart or deployment, which matters for large repositories. Size it for full clones of every repository in every project.Step 4: Configure the deployment lifecycle
Keep to one replica, and make sure an old and a new one never run side by side. Each replica runs migrations on startup and keeps its own clones of your repositories. When it receivesSIGTERM, Compiler stops taking new work and gives in-progress answers up to 25 seconds to finish, so allow at least 30 seconds before the container is killed.
- Kubernetes
- Amazon ECS
- Set
replicas: 1andstrategy.type: Recreate - Set
terminationGracePeriodSeconds: 30or more
Step 5: Add health checks
GET /up on port 3000 returns 200 OK when the app can reach its database, and 503 when it can’t. Use it for liveness and readiness probes, and for load balancer target health checks.
Requests wait until startup migrations finish, so give the first check some room with an initial delay, a startup probe or an ECS health check grace period.
Step 6: Expose it over HTTPS
The container serves plain HTTP. Put a load balancer, ingress or reverse proxy in front of it to terminate TLS, and point your domain at it.- Route
https://compiler.yourdomain.comto port 3000 on the container - Pass the original
Hostheader through. Compiler checks it againstPUBLIC_URLfor its MCP endpoint. Kubernetes ingress controllers and AWS load balancers do this by default - Allow long-lived responses. Answers stream over HTTP, so raise any idle or read timeout below a few minutes
/api/slack/events and needs that path reachable from the internet.
Step 7: Allow outbound access
If your network restricts egress, allow HTTPS (443) from the container to these hosts:
The container also needs to reach your database and Redis, any MCP connectors you add, and your identity provider if you use SSO.
Step 8: Finish setup
Openhttps://compiler.yourdomain.com and sign up as the first user. Setup then walks you through:
- Connecting a GitHub App and choosing the repositories Compiler may read
- Choosing an AI provider, either the Anthropic API or AWS Bedrock
- Creating your first project
On AWS, Bedrock and S3 storage take an IAM access key ID and secret access key, entered in the app. Compiler doesn’t use instance profiles, ECS task roles or IAM Roles for Service Accounts (IRSA).
Updating
Pull the new image and restart the deployment. With themain tag, that’s a rollout restart on Kubernetes or a forced new deployment on ECS. With a pinned sha- tag, change the tag. Migrations run on startup.