Expand description
Applications: the Dokploy-style object over stacks.
An org holds projects; a project holds environments (production by
default); an environment holds apps. An app is a source (an image, or a
git repository plus a crate::build::Builder) and the settings it runs
with: environment, domains, volumes, replicas, port, health check,
resources, command.
A project’s environment renders to ONE ordinary stack named
<project>-<env>, each app one service in it, so apps reach each other
as <app>.<project>-<env> and the stack controller does the rolling
deploys. Deploying an app replaces only its own service in that stack
(revisions are per service), so only that app rolls.
An environment also holds compose stacks (stack_deploy): each belongs
to exactly one project environment (compose). That is a record on
the project, nothing more: the stack keeps its name and its services
their names, and gain the environment’s (<service>.<project>-<env>).
Everything lives under the daemon’s state directory, next to the org’s
stacks: apps/ in the default org, orgs/<org>/apps/ in the others.
apps/projects/<project>.json
apps/<app>/app.json
apps/<app>/deployments/<n>.json, <n>.log
sources/<app>/repo, known_hosts (git checkouts)Re-exports§
pub use compose::ComposeOwner;pub use database::DatabaseSource;pub use database::Engine;pub use deploy::Apps;pub use deploy::BuildFn;pub use deploy::ImageProbe;pub use deploy::SecretHook;pub use env::EnvFile;pub use env::EnvValue;pub use git::GitAuth;pub use git::GitSource;pub use preview::Preview;pub use preview::PreviewSettings;
Modules§
- compose
- Compose stacks in project environments.
- database
- Databases: apps whose source is an engine and a version.
- deploy
- The app service: records on disk, the deploy queue and pipeline, and webhooks.
- env
- An app’s environment as
.envtext, the way Dokploy’s environment tab edits it:KEY=valuelines, comments and blank lines kept in place. - forge
- Commit statuses on the forge: a preview’s state and URL, shown on the pull request.
- git
- Fetching an app’s git source on the host, hardened for an untrusted repository.
- manifest
- An app as a document, for
kubectl apply-style editing: the YAML the web UI’s editor shows andapp_exportreturns,app_applyand the editor’s Save take, and the diff between two of them. - preview
- Preview deployments: one per open pull request, built from its head and served on its own URL until it closes.
- webhook
- Push webhooks: who sent one, whether its signature holds, and what it asks for.
Structs§
- App
- An app as stored: what the user set, plus bookkeeping.
- AppFile
- A file an app gets: the value of org secret
secretatpath. - AppSpec
- What a user sets on an app.
- Build
Settings - How a git source becomes an image.
- Compose
Ref - A compose stack’s place in a project: which environment it belongs to.
- Project
- A project: a named group of environments.
- Rendered
- One app rendered for its stack: the service plus the top-level secrets and volumes it uses. Stored with every deployment, so a rollback puts back exactly what ran.
- Resources
- CPU and memory limits per replica. Either may be written as a number
(
{"cpus": 2}); it is kept as the string it spells.
Enums§
- Source
- Where an app’s code or image comes from.
Constants§
- DEFAULT_
ENVIRONMENT - The environment a project starts with.
- LABEL_
APP - Label (
user.isb.app) on every instance of an app.
Functions§
- compose_
takes_ domains - Whether the compose parser takes a service’s
domains:(the ingress adds it). Until it does, an app’s domains stay in the app record and out of the rendered service. - deploy_
key_ secret - merge_
patch - Merge
patchintobase(RFC 7396):nullremoves a key. - org_
root - Where an org’s apps, projects and sources live: next to its stacks.
- pin
- The OCI reference
imagepinned todigest(docker:traefik/whoami:v1->docker:traefik/whoami@sha256:...), orNonefor an image that is not from an OCI registry. - render
- Render
specrunningimageas its stack service.notesgets what was left out and why. - resources_
schema - The JSON schema of
resourcesin the app and database tools. - splice
- The stack file with
app’s service replaced byr(or removed, withNone), the rest untouched, and top-level secrets and volumes no service uses any more dropped. - stack_
name - The stack a project’s environment renders to.
- validate_
app_ name - An app name: a service name in its stack and a DNS label.
- validate_
part - A project or environment name:
<project>-<env>must be a stack name. - webhook_
secret