Builds
- Railpack (the default) detects the language and framework and builds an image, with no configuration for most apps.
- Dockerfile builds yours. Set its path in Settings if it isn't
Dockerfilein the root directory. - Root directory builds one folder of a monorepo; watch paths deploy only when files matching them change.
- Each build runs in its own throwaway virtual machine, with a cache kept for that app, so later builds are quicker.
Running
- Your app must listen on the port in the
PORTvariable. The edge sends HTTPS traffic to it. - Start command, build command and pre-deploy command (run before each deploy, for example database migrations) are in Settings.
- A health check path must answer before a new deploy takes traffic. Without a volume, deploys switch over with no downtime; an app with a volume stops, then starts.
- Cron schedule runs the app on a schedule instead of keeping it running.
- Each app has a memory limit, set in Settings. An app that goes over it is stopped, and you get an email.
- Deployments keeps recent images: roll back to one in a click.
Variables
- Each app has its own variables, and an environment has shared ones (an app's own win). Paste a whole
.envfile to add many at once. - Changes wait until you deploy, so nothing restarts while you edit. They're encrypted where we store them.
- References fill in values from other services:
${{postgres.DATABASE_URL}}(alsoHOST,PORT,USER,PASSWORD,DATABASE),${{other-app.KEY}},${{shared.KEY}}. PORTand names startingWATTLE_are ours. Every app getsWATTLE_SERVICE_NAME,WATTLE_PUBLIC_DOMAINandWATTLE_PRIVATE_DOMAIN.- Builds see variables as secrets: they're never written into the image.
Config as code: wattle.toml
A wattle.toml in the app's root directory sets its build and deploy settings at each deploy, from GitHub or wattle up:
[build] builder = "railpack" # or "dockerfile" dockerfilePath = "Dockerfile" buildCommand = "npm run build" watchPaths = ["apps/web/**"] [deploy] startCommand = "npm start" preDeployCommand = "npx prisma migrate deploy" healthcheckPath = "/health" cronSchedule = "0 3 * * *"
A mistake in the file, such as an unknown key, fails the build with the reason, and wattle up refuses it before sending anything.
Logs and alerts
Logs shows what the app printed, live, and searches the last 7 days; Metrics shows CPU, memory and network. Owners and admins get an email when a deploy fails or an app crashes, and Settings, Webhooks in your workspace sends the same to Discord, Slack or your own endpoint.