mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-10 16:35:27 +02:00
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:
@@ -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}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user