Skip to main content

Module app

Module app 

Source
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 .env text, the way Dokploy’s environment tab edits it: KEY=value lines, 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 and app_export returns, app_apply and 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 secret at path.
AppSpec
What a user sets on an app.
BuildSettings
How a git source becomes an image.
ComposeRef
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 patch into base (RFC 7396): null removes a key.
org_root
Where an org’s apps, projects and sources live: next to its stacks.
pin
The OCI reference image pinned to digest (docker:traefik/whoami:v1 -> docker:traefik/whoami@sha256:...), or None for an image that is not from an OCI registry.
render
Render spec running image as its stack service. notes gets what was left out and why.
resources_schema
The JSON schema of resources in the app and database tools.
splice
The stack file with app’s service replaced by r (or removed, with None), 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