Configuration and environment inputs
Frappe Docker uses deploy-time inputs to select images, connect Frappe to its data services, and shape the network edge. The environment template gives operators a safe starting point. Docker Compose combines those values with the base service model and selected overrides to produce the stack that runs Frappe.
Configuration input model
The configuration model has three layers. example.env is the operator-facing template for a local .env file. compose.yaml reads those values and supplies defaults to the services that need them. Override files then add infrastructure or change the network edge without changing the base service model.
The template groups inputs by the system area they affect:
| Input group | System effect |
|---|---|
| Image and release selection | Chooses the ERPNext image and controls image pull and restart behavior. |
| Database and Redis endpoints | Tells the one-shot configurator where Frappe finds its database, cache, and queue services. |
| Site and proxy settings | Selects the site for a request and defines published ports, trusted proxy data, host rules, and upload limits. |
| Backend capacity | Sets the web worker count, thread count, and request time limit. |
| Certificate and host settings | Supplies the domain and contact values needed by selected HTTPS or proxy overrides. |
| Persistent data locations | Supplies host paths when a bind-mount variant stores site, database, or queue data outside named volumes. |
| Multi-bench network identity | Names the bench network and identifies the router when a bench joins shared proxy and database networks. |
The template also records the expected use of each value. Some values are needed only for external services. Others apply only when an HTTPS, Traefik, Nginx Proxy, multi-bench, or bind-mount override is selected. Operators must choose a compatible set rather than treat every variable as required for every deployment. Development setup uses a related but separate provisioning flow described in Development environment provisioning.
References: example.env• L1-76 compose.yaml• L1-100 docs/…/04-env-variables.md• L5-160
Compose configuration
The base Compose file describes the application processes but leaves infrastructure choices open. Its services share the sites volume. The configurator service writes shared Frappe connection settings before the backend, real-time, worker, and scheduler services use them. For the wider service relationship model, see Container stack architecture.
Configuration assembly
Compose assembly turns a base file, an environment file, and one or more overrides into the file used at deploy time. This separation lets the same application services run with local or external data services and with different proxy choices.
The assembly flow produces a concrete deployment configuration from operator inputs and selected variants:
flowchart LR
E[.env values] --> C[compose.yaml]
O[Selected override files] --> C
C --> G[docker compose config]
G --> Y[Generated Compose configuration]
Y --> S[Running Frappe services]
S --> F[Shared sites configuration]
The selected edge override defines how requests reach the frontend:
| Variant | System effect | Main inputs or conditions |
|---|---|---|
| No proxy | Publishes the frontend port directly. | HTTP_PUBLISH_PORT and NGINX_LISTEN_PORT control the host and container ports. |
| Proxy | Adds a Traefik HTTP edge with a catch-all host rule. | HTTP_PUBLISH_PORT controls the published HTTP port. |
| HTTPS | Adds HTTP-to-HTTPS routing and certificate management. | SITES_RULE, LETSENCRYPT_EMAIL, HTTP_PUBLISH_PORT, and HTTPS_PUBLISH_PORT must match the public deployment. |
| Nginx Proxy | Registers the frontend with an existing Nginx Proxy service. | NGINX_PROXY_HOSTS identifies the host names. |
| Multi-bench | Joins a bench to shared proxy and database networks. | ROUTER names the bench network and router. SITES_RULE supplies the request rule. |
The usual output is a generated YAML file that can be stored with deployment records or passed directly to docker compose. Database and Redis overrides can supply local data services. Edge overrides can instead connect the application to an existing proxy or shared multi-bench network. See Container stack architecture for the service relationship model.
References: compose.yaml• L1-103 overrides/compose.https.yaml• L1-36 overrides/compose.multi-bench.yaml• L1-54 overrides/compose.nginxproxy.yaml• L1-24 overrides/compose.noproxy.yaml• L1-6 overrides/compose.proxy.yaml• L1-23 docs/…/05-overrides.md• L5-35 docs/…/06-setup-examples.md• L17-37
Runtime configuration handoff
The configurator is the handoff point between Compose inputs and Frappe runtime state. It receives database and Redis endpoints from the assembled service environment. It writes them to the shared site configuration and exits only after the shared settings are ready for dependent services.
This ordering keeps connection data in one shared Frappe configuration instead of requiring each application process to define its own copy. Database or Redis overrides also attach health or start conditions so configuration does not proceed before the selected services are available.
References: compose.yaml• L9-44 overrides/compose.mariadb.yaml• L1-8 overrides/compose.postgres.yaml• L1-8 overrides/compose.redis.yaml• L1-8 docs/…/01-overview.md• L28-47
Configuration maintenance automation
Release automation keeps version-bearing deployment inputs aligned with the images produced by the build workflow. It discovers current Frappe and ERPNext tags, updates the example environment and the single-file deployment reference, and commits the changes when the values differ.
The stable image workflow runs this maintenance after the version-16 image publish succeeds. The generated files therefore act as operator-facing examples of the release that the repository has most recently published.
The child page Configuration maintenance automation describes the synchronization scripts and workflow in more detail.
References: .github/…/core-build-stable.yml• L87-125 .github/…/get_latest_tags.py• L15-83 .github/…/update_example_env.py• L5-28 .github/…/update_pwd.py• L5-30 pwd.yml• L1-244
Change checklist
When these files or sections are changed, remember to consider these:
- Keep image tag updates aligned across example.env, compose.yaml defaults, and pwd.yml if the release workflow still maintains all three deployment entry points.
- When an environment variable changes name or meaning, update both the Compose service that consumes it and every override that supplies or replaces it.
- When a database or Redis service changes, preserve the matching endpoint values and the configurator dependency conditions so shared Frappe settings point to a ready service.
- When proxy, HTTPS, Nginx Proxy, or no-proxy inputs change, check the related service, port, host rule, certificate, forwarded-protocol setting, or host-path override as one contract.
- When multi-bench inputs change, check the router name, request rule, and external network names together. The frontend and application services must join the same networks as their shared proxy and data services.
- When the generated YAML shape changes, check users who store the result of
docker compose configas their deployment artifact.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The chosen database override does not match the database endpoint values | The configurator writes the wrong host or port and application services cannot connect. | Use the matching database override and verify its configurator environment. |
| Redis endpoints are absent or point to the wrong service names | Background jobs, cache access, or real-time updates fail. | Select the Redis override for bundled Redis or set both external Redis endpoints. |
| HTTPS, Nginx Proxy, or no-proxy inputs do not match the selected edge | Requests do not route correctly, certificates cannot be issued, or the frontend is not reachable on the expected port. | Use the input set required by the selected edge override. |
| A multi-bench router or external network does not match the shared services | The frontend cannot receive proxy traffic or application services cannot reach the shared database. | Use the same router and externally created network names across the connected stacks. |
| A bind-mount path is missing or points to a path with the wrong ownership | Persistent data cannot be read or written by the selected service. | Use an existing host path with the ownership and permissions required by the selected bind-mount override. |
| A release tag changes in the published image but not in the deployment reference | A generated deployment can run an older image than the release workflow produced. | Let the stable workflow update both version-bearing files and review the resulting change. |
| A generated Compose file is reused after its source inputs change | The deployment keeps stale image, service, or routing settings. | Regenerate the file with the same environment file and override set before rollout. |
Key files
| File | Why to read it |
|---|---|
| example.env | The operator-facing template for deploy-time values. |
| compose.yaml | The base service model and the main path from environment values to running Frappe processes. |
| overrides/compose.https.yaml | Shows the HTTPS edge, certificate inputs, and public ports. |
| overrides/compose.multi-bench.yaml | Shows how a bench joins shared proxy and database networks. |
| overrides/compose.nginxproxy.yaml | Shows registration with an existing Nginx Proxy service. |
| overrides/compose.noproxy.yaml | Shows direct frontend publication without a reverse proxy. |
| overrides/compose.proxy.yaml | Shows the HTTP Traefik edge. |
| overrides/compose.mariadb.yaml | Shows how a bundled database is added and connected to the configurator. |
| overrides/compose.postgres.yaml | Shows the alternate database contract. |
| overrides/compose.redis.yaml | Shows how bundled cache and queue services are selected. |
| docs/…/05-overrides.md | Summarizes the supported deployment variants and their required inputs. |
| .github/…/core-build-stable.yml | Shows when version synchronization runs in the release path. |
| .github/…/update_example_env.py | Shows how the environment template receives the published ERPNext version. |
| .github/…/update_pwd.py | Shows how the single-file deployment reference receives the published image version. |
| pwd.yml | A complete generated-style Compose reference with explicit values and service relationships. |