From 8cc5eaf06e923fc5be498ac6e5da79e1e56d4590 Mon Sep 17 00:00:00 2001 From: Jordy Schreuders <3071062+99linesofcode@users.noreply.github.com> Date: Sun, 18 Oct 2026 11:42:57 +0200 Subject: [PATCH 1/3] fix(frankenphp): copy vendor into the production image and enable the entrypoint The composer-builder stage ran composer install without first copying composer.json or composer.lock into the stage, and the production stage never copied the resulting vendor/ out of it. vendor/ is gitignored in the application, so COPY . ./ cannot supply it either, and the published image shipped without dependencies. The docker-php-entrypoint COPY was commented out, so the entrypoint never ran. Its job is to run artisan deploy commands. --- frankenphp/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index 504cd79..8615bb3 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -53,6 +53,8 @@ COPY --link ./frankenphp/php.ini-development ${PHP_INI_DIR}/php.ini # FROM base AS composer-builder +COPY --link ./composer.json ./composer.lock ./ + RUN install-php-extensions \ @composer && \ composer install -n --no-cache --prefer-dist --no-dev --no-scripts -o -a; @@ -64,6 +66,7 @@ RUN mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini; # Replace the official binary by the one containing our custom modules # COPY --from=caddy-builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp COPY --link ./docker/frankenphp/Caddyfile /etc/caddy/Caddyfile -# COPY --link --chmod=755 ./docker/frankenphp/docker-php-entrypoint.sh /usr/local/bin/docker-php-entrypoint +COPY --link --chmod=755 ./docker/frankenphp/docker-php-entrypoint.sh /usr/local/bin/docker-php-entrypoint COPY . ./ +COPY --link --from=composer-builder /app/vendor ./vendor From 6469501aff5659082104665749d4ee69f62e12ac Mon Sep 17 00:00:00 2001 From: Jordy Schreuders <3071062+99linesofcode@users.noreply.github.com> Date: Sun, 18 Oct 2026 11:46:03 +0200 Subject: [PATCH 2/3] fix(frankenphp): invoke the run subcommand from the entrypoint The entrypoint called `frankenphp "$@"` where the base image calls `frankenphp run "$@"`. With the container command `--config ...` this produced `Error: unknown flag: --config` and the container exited. The defect was invisible while the entrypoint COPY was commented out. --- frankenphp/docker-php-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frankenphp/docker-php-entrypoint.sh b/frankenphp/docker-php-entrypoint.sh index 5b9cf4c..7052abc 100644 --- a/frankenphp/docker-php-entrypoint.sh +++ b/frankenphp/docker-php-entrypoint.sh @@ -4,7 +4,7 @@ set -e # first arg is `-f` or `--some-option` if [ "${1#-}" != "$1" ]; then - set -- frankenphp "$@" + set -- frankenphp run "$@" fi # TODO: add deploy:setup command on first deployment From 463daf203d1b92ffd0e14ee512ce44009fee645e Mon Sep 17 00:00:00 2001 From: Jordy Schreuders <3071062+99linesofcode@users.noreply.github.com> Date: Sun, 18 Oct 2026 12:20:46 +0200 Subject: [PATCH 3/3] feat(frankenphp): use the application's .env.production as .env The application ships a .env.production in its repository, and the production image now installs it as .env so the container starts configured. The copy is last so that COPY . ./ cannot clobber it, and the application's .dockerignore excludes .env. --- frankenphp/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index 8615bb3..76d68d4 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -70,3 +70,4 @@ COPY --link --chmod=755 ./docker/frankenphp/docker-php-entrypoint.sh /usr/local/ COPY . ./ COPY --link --from=composer-builder /app/vendor ./vendor +COPY --link .env.production .env