Documentation
¶
Overview ¶
Package detect decides how a folder should be built. The same pipeline backs `donkey init` and `donkey deploy`:
- donkey.yaml with an explicit build.type wins
- a Dockerfile in the folder (the user's Dockerfile always beats a builder)
- a Dockerfile donkey's assistant wrote earlier (.donkey/Dockerfile)
- donkey's own builder, which has the assistant write the Dockerfile
Every path ends at a Dockerfile. That is the whole design: donkey builds one kind of thing, so there is one code path to the build engine, and what an app is built with is a file the user can read, edit and keep.
Index ¶
Constants ¶
const AIDockerfilePath = ".donkey/Dockerfile"
AIDockerfilePath is where a Dockerfile donkey wrote lives — under .donkey/, so a user's own Dockerfile is never clobbered.
const StackStatic = "static"
StackStatic is a site served as files, by nginx, caddy or httpd.
Variables ¶
This section is empty.
Functions ¶
func Stack ¶
Stack names what an app is written in, read off the base images of the Dockerfile it was built from — the one fact every build has, whether the app brought the recipe or the assistant wrote it. The answer is a short key the console turns into an icon ("python", "go", "node", …), or "" when no image says.
A language beats a web server: a site built with node and served by nginx is a node app, a Go binary on distroless is a Go app. Among languages the first stage wins, since builds start from the toolchain.
Types ¶
type Detection ¶
type Detection struct {
Strategy config.BuildStrategy
DockerfilePath string // for the dockerfile strategy
// GeneratedRecipe also identifies a saved .donkey/Dockerfile selected
// automatically; security findings may repair it just like a fresh recipe.
GeneratedRecipe bool
// Summary is a one-line plain-language description of what was found.
Summary string
}