From db9d4c623bd03aa8b2359f9ca9ff5e4393fdcd8d Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Sat, 3 Jan 2026 17:47:16 -0500 Subject: [PATCH 1/7] Fix plugin installs Fixes being able to install plugins Resolves #2024 Resolves #2025 Fixes symlink for plugins Adds symlink for server icons Resolves #2054 Fixes loading environment variables Resolves #2056 Integrates #2051 #2034 #2045 into a single PR. --- Dockerfile | 15 ++++++++++----- Dockerfile.dev | 14 ++++++++++---- docker/entrypoint.sh | 4 ++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d10b4aaed..60d4a13176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,9 +62,11 @@ FROM --platform=$TARGETOS/$TARGETARCH localhost:5000/base-php:$TARGETARCH AS fin WORKDIR /var/www/html -# Install additional required libraries RUN apk add --no-cache \ - caddy ca-certificates supervisor supercronic fcgi + # packages for running the panel + caddy ca-certificates supervisor supercronic fcgi \ + # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 + zip unzip 7zip bzip2-dev yarn COPY --chown=root:www-data --chmod=640 --from=composerbuild /build . COPY --chown=root:www-data --chmod=640 --from=yarnbuild /build/public ./public @@ -78,12 +80,15 @@ RUN chown root:www-data ./ \ # Create necessary directories && mkdir -p /pelican-data/storage /pelican-data/plugins /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ # Symlinks for env, database, storage, and plugins - && ln -s /pelican-data/.env ./.env \ - && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ + && ln -s /pelican-data/.env ./.env \ + && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ - && ln -s /pelican-data/plugins /var/www/html/plugins \ + && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ + && rmdir /var/www/html/plugins \ + # fix from https://github.com/pelican-dev/panel/pull/2051 + && ln -s /pelican-data/plugins /var/www/html \ # Allow www-data write permissions where necessary && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ diff --git a/Dockerfile.dev b/Dockerfile.dev index 008e55d6e8..33588db781 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -68,7 +68,10 @@ WORKDIR /var/www/html # Install additional required libraries RUN apk add --no-cache \ - caddy ca-certificates supervisor supercronic fcgi coreutils + # packages for running the panel + caddy ca-certificates supervisor supercronic fcgi coreutils \ + # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 + zip unzip 7zip bzip2-dev yarn COPY --chown=root:www-data --chmod=640 --from=composerbuild /build . COPY --chown=root:www-data --chmod=640 --from=yarnbuild /build/public ./public @@ -82,12 +85,15 @@ RUN chown root:www-data ./ \ # Create necessary directories && mkdir -p /pelican-data/storage /pelican-data/plugins /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ # Symlinks for env, database, storage, and plugins - && ln -s /pelican-data/.env ./.env \ - && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ + && ln -s /pelican-data/.env ./.env \ + && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ - && ln -s /pelican-data/plugins /var/www/html/plugins \ + && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ + && rmdir /var/www/html/plugins \ + # fix from https://github.com/pelican-dev/panel/pull/2051 + && ln -s /pelican-data/plugins /var/www/html \ # Allow www-data write permissions where necessary && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1d53caa0c9..82330a0538 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -3,7 +3,7 @@ if [ -f /var/www/html/.env ]; then echo "external vars exist." # load env vars from .env - export $(grep -v '^#' .env | xargs) + export $(grep -v '^#' .env | xargs -d '\n') # Fix is from https://github.com/pelican-dev/panel/pull/2045 else echo "external vars don't exist." # webroot .env is symlinked to this path @@ -25,7 +25,7 @@ else fi # create directories for volumes -mkdir -p /pelican-data/database /pelican-data/storage/avatars /pelican-data/storage/fonts /var/www/html/storage/logs/supervisord 2>/dev/null +mkdir -p /pelican-data/database /pelican-data/storage/avatars /pelican-data/storage/fonts /pelican-data/storage/icons /var/www/html/storage/logs/supervisord 2>/dev/null # if the app is installed then we need to run migrations on start. New installs will run migrations when you run the installer. if [ "${APP_INSTALLED}" == "true" ]; then From 09d61a7b18a8fadceee5e07a18b6cf67a05ce6a2 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 6 Jan 2026 12:30:19 -0500 Subject: [PATCH 2/7] Update Dockerfile.dev Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --- Dockerfile.dev | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index 33588db781..17f0c52f05 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -91,9 +91,7 @@ RUN chown root:www-data ./ \ && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ - && rmdir /var/www/html/plugins \ - # fix from https://github.com/pelican-dev/panel/pull/2051 - && ln -s /pelican-data/plugins /var/www/html \ + && ln -sf /pelican-data/plugins /var/www/html \ # Allow www-data write permissions where necessary && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ From adcdd21fcd6fe497556705bee679f75e791c4121 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 6 Jan 2026 12:30:31 -0500 Subject: [PATCH 3/7] Update Dockerfile Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60d4a13176..252cff0bc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,9 +86,7 @@ RUN chown root:www-data ./ \ && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ - && rmdir /var/www/html/plugins \ - # fix from https://github.com/pelican-dev/panel/pull/2051 - && ln -s /pelican-data/plugins /var/www/html \ + && ln -sf /pelican-data/plugins /var/www/html \ # Allow www-data write permissions where necessary && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ From 46f6735cf5e858a424c72b3d4ae3515242f3dbb4 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 13 Jan 2026 00:45:46 -0500 Subject: [PATCH 4/7] More Docker Cleanup Entrypoint updated loading env vars from .env Dockerfile changed Removes posix and opcache as they are already installed. Removes Caddyfile from the copy commands as it's in the docker folder already Update the final copy commands to 770 reduce the numbers of dirs created reduce the number of symlinks required. moved chown commands to the end Genera Moved the supercronic crontab folder to the crontabs built in folder. Updated supervisord.conf to match. --- Dockerfile | 43 +++++++++++++++++---------------------- Dockerfile.base | 2 +- Dockerfile.dev | 45 +++++++++++++++++------------------------ docker/entrypoint.sh | 2 +- docker/supervisord.conf | 2 +- 5 files changed, 40 insertions(+), 54 deletions(-) diff --git a/Dockerfile b/Dockerfile index 252cff0bc1..c987ef782b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN yarn config set network-timeout 300000 \ FROM --platform=$TARGETOS/$TARGETARCH composer AS composerbuild # Copy full code to optimize autoload -COPY --exclude=Caddyfile --exclude=docker/ . ./ +COPY --exclude=docker/ . ./ RUN composer dump-autoload --optimize @@ -50,7 +50,7 @@ FROM --platform=$TARGETOS/$TARGETARCH yarn AS yarnbuild WORKDIR /build # Copy full code -COPY --exclude=Caddyfile --exclude=docker/ . ./ +COPY --exclude=docker/ . ./ COPY --from=composer /build . RUN yarn run build @@ -68,35 +68,28 @@ RUN apk add --no-cache \ # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 zip unzip 7zip bzip2-dev yarn -COPY --chown=root:www-data --chmod=640 --from=composerbuild /build . -COPY --chown=root:www-data --chmod=640 --from=yarnbuild /build/public ./public - -# Set permissions -# First ensure all files are owned by root and restrict www-data to read access -RUN chown root:www-data ./ \ - && chmod 750 ./ \ - # Files should not have execute set, but directories need it - && find ./ -type d -exec chmod 750 {} \; \ - # Create necessary directories - && mkdir -p /pelican-data/storage /pelican-data/plugins /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ - # Symlinks for env, database, storage, and plugins - && ln -s /pelican-data/.env ./.env \ +COPY --chown=root:www-data --chmod=770 --from=composerbuild /build . +COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public + +# Create and remove directories +RUN mkdir -p /pelican-data/storage /pelican-data/plugins /var/run/supervisord \ + && rm -rf /var/www/html/plugins \ +# Symlinks for env, database, storage, and plugins + && ln -s /pelican-data/.env /var/www/html/.env \ && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ - && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ - && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ - && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ - && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ - && ln -sf /pelican-data/plugins /var/www/html \ - # Allow www-data write permissions where necessary - && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ - && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ - && chown -R www-data: /usr/local/etc/php/ + && ln -s /pelican-data/storage /var/www/html/public/storage \ + && ln -s /pelican-data/storage /var/www/html/storage/app/public \ + && ln -s /pelican-data/plugins /var/www/html \ +# Allow www-data write permissions where necessary + && chown -R www-data: /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ + && chmod -R 770 /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ + && chown -R www-data: /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ # Configure Supervisor COPY docker/supervisord.conf /etc/supervisord.conf COPY docker/Caddyfile /etc/caddy/Caddyfile # Add Laravel scheduler to crontab -COPY docker/crontab /etc/supercronic/crontab +COPY docker/crontab /etc/crontabs/crontab COPY docker/entrypoint.sh /entrypoint.sh COPY docker/healthcheck.sh /healthcheck.sh diff --git a/Dockerfile.base b/Dockerfile.base index 42b6923cfb..1399573335 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -5,6 +5,6 @@ FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql pdo_pgsql +RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql RUN rm /usr/local/bin/install-php-extensions diff --git a/Dockerfile.dev b/Dockerfile.dev index 17f0c52f05..06aa41e0da 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -5,7 +5,7 @@ FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine AS base ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql pdo_pgsql +RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql RUN rm /usr/local/bin/install-php-extensions @@ -42,7 +42,7 @@ RUN yarn config set network-timeout 300000 \ FROM --platform=$TARGETOS/$TARGETARCH composer AS composerbuild # Copy full code to optimize autoload -COPY --exclude=Caddyfile --exclude=docker/ . ./ +COPY --exclude=docker/ . ./ RUN composer dump-autoload --optimize @@ -54,7 +54,7 @@ FROM --platform=$TARGETOS/$TARGETARCH yarn AS yarnbuild WORKDIR /build # Copy full code -COPY --exclude=Caddyfile --exclude=docker/ . ./ +COPY --exclude=docker/ . ./ COPY --from=composer /build . RUN yarn run build @@ -73,35 +73,28 @@ RUN apk add --no-cache \ # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 zip unzip 7zip bzip2-dev yarn -COPY --chown=root:www-data --chmod=640 --from=composerbuild /build . -COPY --chown=root:www-data --chmod=640 --from=yarnbuild /build/public ./public - -# Set permissions -# First ensure all files are owned by root and restrict www-data to read access -RUN chown root:www-data ./ \ - && chmod 750 ./ \ - # Files should not have execute set, but directories need it - && find ./ -type d -exec chmod 750 {} \; \ - # Create necessary directories - && mkdir -p /pelican-data/storage /pelican-data/plugins /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ - # Symlinks for env, database, storage, and plugins - && ln -s /pelican-data/.env ./.env \ +COPY --chown=root:www-data --chmod=770 --from=composerbuild /build . +COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public + +# Create and remove directories +RUN mkdir -p /pelican-data/storage /pelican-data/plugins /var/run/supervisord \ + && rm -rf /var/www/html/plugins \ +# Symlinks for env, database, storage, and plugins + && ln -s /pelican-data/.env /var/www/html/.env \ && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ - && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ - && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ - && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ - && ln -s /pelican-data/storage/icons /var/www/html/storage/app/public/icons \ - && ln -sf /pelican-data/plugins /var/www/html \ - # Allow www-data write permissions where necessary - && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ - && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ - && chown -R www-data: /usr/local/etc/php/ + && ln -s /pelican-data/storage /var/www/html/public/storage \ + && ln -s /pelican-data/storage /var/www/html/storage/app/public \ + && ln -s /pelican-data/plugins /var/www/html \ +# Allow www-data write permissions where necessary + && chown -R :www-data /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ + && chmod -R 770 /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ + && chown -R :www-data /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ # Configure Supervisor COPY docker/supervisord.conf /etc/supervisord.conf COPY docker/Caddyfile /etc/caddy/Caddyfile # Add Laravel scheduler to crontab -COPY docker/crontab /etc/supercronic/crontab +COPY docker/crontab /etc/crontabs/crontab COPY docker/entrypoint.sh /entrypoint.sh COPY docker/healthcheck.sh /healthcheck.sh diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 82330a0538..b46f1959de 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -3,7 +3,7 @@ if [ -f /var/www/html/.env ]; then echo "external vars exist." # load env vars from .env - export $(grep -v '^#' .env | xargs -d '\n') # Fix is from https://github.com/pelican-dev/panel/pull/2045 + export $(awk -F[=] 'NF {gsub("\042", "\000"); print $1"="$2}' .env) else echo "external vars don't exist." # webroot .env is symlinked to this path diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 793bb564c9..870814f485 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -41,7 +41,7 @@ stdout_logfile_maxbytes=0 redirect_stderr=true [program:supercronic] -command=supercronic -overlapping /etc/supercronic/crontab +command=supercronic -overlapping /etc/crontabs/crontab autostart=true autorestart=true redirect_stderr=true From 64fc0d563c95fb3c6881258b00b1cc03477c086d Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 13 Jan 2026 01:00:46 -0500 Subject: [PATCH 5/7] Handle env file comments --- docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index b46f1959de..66bde44d0e 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -3,7 +3,7 @@ if [ -f /var/www/html/.env ]; then echo "external vars exist." # load env vars from .env - export $(awk -F[=] 'NF {gsub("\042", "\000"); print $1"="$2}' .env) + export $(awk -F[=] 'NF {gsub("\042", "\000");if ($0 ~ /^(#|$)/ ) {next;}; print $1"="$2}' .env) else echo "external vars don't exist." # webroot .env is symlinked to this path From 47022e3c81e74eaa7b89706607a323a4293112e3 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 13 Jan 2026 10:20:17 -0500 Subject: [PATCH 6/7] Update Dockerfiles Add php bz2 extension and git for plugin support correct Dockerfile.dev chown commands --- Dockerfile | 2 +- Dockerfile.base | 2 +- Dockerfile.dev | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c987ef782b..42f3940486 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ RUN apk add --no-cache \ # packages for running the panel caddy ca-certificates supervisor supercronic fcgi \ # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 - zip unzip 7zip bzip2-dev yarn + zip unzip 7zip bzip2-dev yarn git COPY --chown=root:www-data --chmod=770 --from=composerbuild /build . COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public diff --git a/Dockerfile.base b/Dockerfile.base index 1399573335..f01323ebca 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -5,6 +5,6 @@ FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql +RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql bz2 RUN rm /usr/local/bin/install-php-extensions diff --git a/Dockerfile.dev b/Dockerfile.dev index 06aa41e0da..158927f3c2 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -5,7 +5,7 @@ FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine AS base ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql +RUN install-php-extensions bcmath gd intl zip pcntl pdo_mysql pdo_pgsql bz2 RUN rm /usr/local/bin/install-php-extensions @@ -71,7 +71,7 @@ RUN apk add --no-cache \ # packages for running the panel caddy ca-certificates supervisor supercronic fcgi coreutils \ # required for installing plugins. Pulled from https://github.com/pelican-dev/panel/pull/2034 - zip unzip 7zip bzip2-dev yarn + zip unzip 7zip bzip2-dev yarn git COPY --chown=root:www-data --chmod=770 --from=composerbuild /build . COPY --chown=root:www-data --chmod=770 --from=yarnbuild /build/public ./public @@ -86,9 +86,9 @@ RUN mkdir -p /pelican-data/storage /pelican-data/plugins /var/run/supervisord \ && ln -s /pelican-data/storage /var/www/html/storage/app/public \ && ln -s /pelican-data/plugins /var/www/html \ # Allow www-data write permissions where necessary - && chown -R :www-data /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ + && chown -R www-data: /pelican-data .env ./storage ./plugins ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R 770 /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ - && chown -R :www-data /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ + && chown -R www-data: /usr/local/etc/php/ /usr/local/etc/php-fpm.d/ # Configure Supervisor COPY docker/supervisord.conf /etc/supervisord.conf From ee77a476d23a3333e93f8a9d02ac0d1eb8640962 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Tue, 13 Jan 2026 10:30:33 -0500 Subject: [PATCH 7/7] entrypoint updates update var loading to be more stupid only loads required vars when they are not already set. --- docker/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 66bde44d0e..0611978bdf 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,8 +2,8 @@ # check for .env file or symlink and generate app keys if missing if [ -f /var/www/html/.env ]; then echo "external vars exist." - # load env vars from .env - export $(awk -F[=] 'NF {gsub("\042", "\000");if ($0 ~ /^(#|$)/ ) {next;}; print $1"="$2}' .env) + # load specific env vars from .env used in the entrypoint and they are not already set + for VAR in "APP_KEY" "APP_INSTALLED" "DB_CONNECTION" "DB_HOST" "DB_PORT"; do if ! (printenv | grep -q ${VAR}); then export $(grep ${VAR} .env | grep -ve "^#"); fi; done else echo "external vars don't exist." # webroot .env is symlinked to this path