From f4d572b0d321bebf1ea7d2dc0d97453df0b06399 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Fri, 6 Feb 2026 02:45:01 -0500 Subject: [PATCH] Fix ASSET_URL not reaching PHP-FPM behind reverse proxy (#2026) PHP-FPM's clear_env default strips shell environment variables, so the exported ASSET_URL was never visible to Laravel. This persists it to .env where Dotenv can read it. --- docker/entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 5945f2700..1176b8be9 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -65,6 +65,13 @@ if [ "${BEHIND_PROXY}" == "true" ]; then export PARSED_APP_URL=":80" export PARSED_AUTO_HTTPS="auto_https off" export ASSET_URL=${APP_URL} + + # Write ASSET_URL to .env so PHP-FPM workers can read it (clear_env = yes by default) + if grep -q "^ASSET_URL=" /pelican-data/.env; then + sed -i "s|^ASSET_URL=.*|ASSET_URL=${APP_URL}|" /pelican-data/.env + else + echo "ASSET_URL=${APP_URL}" >> /pelican-data/.env + fi fi # disable caddy if SKIP_CADDY is set