Skip to content

Commit e722c53

Browse files
committed
Micro-optim for Symfony/FrankenPHP
1 parent e38f75a commit e722c53

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

frameworks/PHP/php/deploy/franken/Caddyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ route {
2121
}
2222

2323
respond 404
24-
}
24+
}

frameworks/PHP/symfony/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"ext-ctype": "*",
77
"ext-iconv": "*",
88
"ext-mbstring": "*",
9+
"runtime/frankenphp-symfony": "*",
910
"symfony/console": "^7",
1011
"symfony/dotenv": "^7",
1112
"symfony/flex": "^2",

frameworks/PHP/symfony/symfony-franken.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/compose
1111
COPY --link deploy/Caddyfile /etc/caddy/Caddyfile
1212
COPY --link deploy/conf/php.ini /usr/local/etc/php/
1313

14+
RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /usr/local/etc/php/php.ini && \
15+
echo "opcache.preload_user=root" >> /usr/local/etc/php/php.ini
16+
1417
WORKDIR /symfony
1518
COPY --link . .
1619

1720
ENV FRANKENPHP_CONFIG="worker /symfony/public/runtime.php"
1821
ENV APP_RUNTIME="Runtime\FrankenPhpSymfony\Runtime"
1922
#ENV CADDY_DEBUG=debug
20-
RUN composer require runtime/frankenphp-symfony --update-no-dev --no-scripts --quiet
23+
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet
2124
RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear
2225

2326
EXPOSE 8080

0 commit comments

Comments
 (0)