From 3c67765992d7369a79812bc8cd216c9ba12fd96e Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Thu, 26 Sep 2024 09:08:59 +0200 Subject: [PATCH] fix: port environment variables get ignored in caddyfile --- reverse-proxy/Caddyfile | 6 +++--- reverse-proxy/Caddyfile.trust-proxy | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reverse-proxy/Caddyfile b/reverse-proxy/Caddyfile index ac3249a..c72063d 100644 --- a/reverse-proxy/Caddyfile +++ b/reverse-proxy/Caddyfile @@ -1,7 +1,7 @@ :80 { - reverse_proxy /api/* http://localhost:8080 - reverse_proxy /.well-known/* http://localhost:8080 - reverse_proxy /* http://localhost:3000 + reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} + reverse_proxy /.well-known/* http://localhost:{$BACKEND_PORT:8080} + reverse_proxy /* http://localhost:{$PORT:3000} log { output file /var/log/caddy/access.log diff --git a/reverse-proxy/Caddyfile.trust-proxy b/reverse-proxy/Caddyfile.trust-proxy index 068a98d..65af165 100644 --- a/reverse-proxy/Caddyfile.trust-proxy +++ b/reverse-proxy/Caddyfile.trust-proxy @@ -1,11 +1,11 @@ :80 { - reverse_proxy /api/* http://localhost:8080 { + reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} { trusted_proxies 0.0.0.0/0 } - reverse_proxy /.well-known/* http://localhost:8080 { + reverse_proxy /.well-known/* http://localhost:{$BACKEND_PORT:8080} { trusted_proxies 0.0.0.0/0 } - reverse_proxy /* http://localhost:3000 { + reverse_proxy /* http://localhost:{$PORT:3000} { trusted_proxies 0.0.0.0/0 }