Documentation
¶
Overview ¶
Package props declares the Dokku-style "<plugin>:set <app> <key> <value>" properties. Each plugin's keys live in the generic properties table, and the CLI generates "<plugin>:set" and "<plugin>:report" commands from this list, so adding a setting is one entry here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MinSleepAfter = 30 * time.Second
MinSleepAfter is the shortest sleep-after: proxies report requests every few seconds, so a shorter one could put an app to sleep while it's used. A variable so tests can shorten it.
View Source
var Plugins = []Plugin{ { Name: "git", Help: "Manage app deploys via git", Settable: true, Keys: []Key{ {Name: "deploy-branch", Default: "main", Help: "Branch that triggers a deploy when pushed"}, {Name: "keep-git-dir", Default: "false", Help: "Keep the .git directory in the build context", Validate: isBool}, }, }, { Name: "builder", Help: "Manage how an app is built", Settable: true, Keys: []Key{ {Name: "type", Default: "dockerfile", Help: "dockerfile, compose or image", Validate: oneOf("dockerfile", "compose", "image"), SetBy: "jokku builder:dockerfile, builder:compose or builder:image"}, {Name: "file", Help: "The Dockerfile or compose file, relative to the build dir; empty for the default", SetBy: "jokku builder:dockerfile <app> <path> or builder:compose <app> <path>"}, {Name: "image", Help: "The registry image an image app runs", SetBy: "jokku builder:image"}, {Name: "build-dir", Help: "Subdirectory of the repo to build from"}, {Name: "procfile", Default: "Procfile", Help: "Path to the Procfile, relative to the build dir"}, }, }, { Name: "checks", Help: "Manage zero-downtime deploy checks", Settable: true, Keys: []Key{ {Name: "wait-to-retire", Default: "60", Help: "Seconds to keep old instances after a deploy", Validate: isNonNegativeInt}, {Name: "timeout", Default: "120", Help: "Seconds new instances get to boot and pass checks", Validate: isNonNegativeInt}, }, }, { Name: "ps", Help: "Manage app processes", Settable: true, Keys: []Key{ {Name: "restart-policy", Default: "on-failure:10", Help: "always | no | on-failure[:N]", Validate: isRestartPolicy}, {Name: "sleep-after", Help: "Stop the app's instances after this long without requests (15m, 1h); the next request starts them again", Validate: isSleepAfter}, }, }, { Name: "proxy", Help: "Manage the HTTP proxy for an app", Settable: true, Keys: []Key{ {Name: "enabled", Default: "true", Help: "Route HTTP traffic to the app", Validate: isBool}, {Name: "compress", Default: "true", Help: "Compress the text responses the app doesn't compress itself", Validate: isBool}, }, }, { Name: "letsencrypt", Help: "Manage automatic TLS certificates", Settable: true, Keys: []Key{ {Name: "email", Default: "", Help: "ACME account email (usually set with --global)"}, {Name: "enabled", Default: "true", Help: "Request certificates for the app's domains", Validate: isBool}, }, }, }
Functions ¶
func SleepAfter ¶
SleepAfter reads a computed sleep-after: 0 for never.
Types ¶
Click to show internal directories.
Click to hide internal directories.