Configuration file
You can keep an app’s build settings in your repository instead of only in the panel. Add a
twelveinks.json at the root and we read it on request.
{ "port": 3000, "buildPack": "dockerfile", "baseDirectory": "apps/web", "dockerfileLocation": "Dockerfile", "env": { "NODE_ENV": "production", "FEATURE_BILLING": "true" }}Completion in your editor
Section titled “Completion in your editor”Add a $schema line and most editors will complete the settings for you, show what each one means,
and flag a mistake as you type rather than when you apply the file.
{ "$schema": "https://docs.twelveinks.com/schemas/twelveinks.json", "port": 3000}Applying it
Section titled “Applying it”Open your app, go to Settings, and use Read from my repository on the Configuration file card. You will see exactly what would change before anything is applied.
Applying does not deploy. Deploy afterwards for the settings to take effect.
Private repositories
Section titled “Private repositories”We can only read this file from a public GitHub, GitLab or Bitbucket repository. For a private one, use Paste the file instead on the same card.
Settings
Section titled “Settings”| Key | Type | Meaning |
|---|---|---|
port |
number | The port your app listens on inside its container |
buildPack |
string | nixpacks, dockerfile, dockercompose or static |
baseDirectory |
string | Subdirectory the build runs in, for a monorepo |
dockerfileLocation |
string | Dockerfile path, relative to the base directory |
env |
object | Environment variables to set |
Every key is optional, and anything you leave out stays as it is. A file setting only port will
not clear your other settings.
Comments and trailing commas are allowed, so you can annotate the file.
Things it will refuse
Section titled “Things it will refuse”PORTinenv. We set that one for you, so that the port we route to and the port you listen on cannot disagree. Read it in your app instead. See Ports.- Paths containing
.., which would point the build outside your repository. - A
buildPackwe cannot run. The four above are the whole list. - A file with a mistake anywhere in it. Nothing is applied unless all of it is valid, so you are never left with settings matching neither the file nor what you had before. All the problems are reported at once rather than one per attempt.
A key we do not recognise is ignored, and we tell you which one, so a typo like "ports" does not
look like a setting that quietly failed.

