fix(plane): set proxy SITE_ADDRESS and TRUSTED_PROXIES to fix Caddyfile crash

The plane-proxy Caddyfile.ce ends with a `{$SITE_ADDRESS} { import plane_proxy }`
block. SITE_ADDRESS has no inline default upstream, so when it is unset the block
becomes keyless and Caddy aborts with:

  adapting config using caddyfile: server block without any key is global
  configuration, and if used, it must be first

Expose SITE_ADDRESS (:80, matching the proxy `expose: ["80"]` + domain port 80,
since Dokploy terminates TLS upstream) and TRUSTED_PROXIES (0.0.0.0/0, matching
the Caddyfile inline default) on the proxy env, and document both in template.toml
so they render into the generated env. Reported and verified by @RDeluxe in #912.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
LeoGomide
2026-06-03 10:13:14 -03:00
parent 11bc16ea36
commit 34501dd8b5
2 changed files with 8 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ x-proxy-env: &proxy-env
APP_DOMAIN: ${APP_DOMAIN:-localhost}
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
# Caddy proxy: listen address (no upstream default in Caddyfile -> must be set,
# else the `{$SITE_ADDRESS} { ... }` block is keyless and Caddy aborts) + trusted proxies
SITE_ADDRESS: ${SITE_ADDRESS:-:80}
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-0.0.0.0/0}
x-mq-env: &mq-env
RABBITMQ_HOST: ${RABBITMQ_HOST:-plane-mq}

View File

@@ -45,6 +45,10 @@ env = [
"AWS_S3_ENDPOINT_URL=http://plane-minio:9000",
"AWS_S3_BUCKET_NAME=uploads",
"FILE_SIZE_LIMIT=5242880",
# Caddy proxy listen address + trusted proxies (required by the plane-proxy Caddyfile;
# SITE_ADDRESS has no upstream default, so leaving it unset crashes the proxy)
"SITE_ADDRESS=:80",
"TRUSTED_PROXIES=0.0.0.0/0",
"MINIO_ENDPOINT_SSL=0",
"DEBUG=0",
"GUNICORN_WORKERS=1",