-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
211 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# ----------------------------------------------------- | ||
# FrankenPHP | ||
#------------------------------------------------------ | ||
FROM dunglas/frankenphp:1-php8.4 | ||
|
||
ARG PORT=9001 | ||
|
||
ENV PORT=$PORT SERVER_NAME=":80, :$PORT" | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" | ||
ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" | ||
|
||
COPY --link --chmod=755 ./8.4-frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
|
||
ENTRYPOINT ["docker-entrypoint"] | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
acl \ | ||
file \ | ||
gettext \ | ||
gifsicle \ | ||
git \ | ||
imagemagick \ | ||
jpegoptim \ | ||
libexif-dev \ | ||
libheif-dev \ | ||
libvips42 \ | ||
optipng \ | ||
pngquant \ | ||
procps \ | ||
supervisor \ | ||
unzip \ | ||
webp \ | ||
zip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN set -eux; \ | ||
install-php-extensions \ | ||
@composer \ | ||
amqp \ | ||
apcu \ | ||
bcmath \ | ||
exif \ | ||
ffi \ | ||
gd \ | ||
gmp \ | ||
igbinary \ | ||
imagick \ | ||
intl \ | ||
maxminddb \ | ||
mongodb \ | ||
opcache \ | ||
pcntl \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
redis \ | ||
sockets \ | ||
sysvmsg \ | ||
sysvsem \ | ||
sysvshm \ | ||
uuid \ | ||
xsl \ | ||
zip \ | ||
; | ||
|
||
# Copying manifest files to host | ||
COPY ./8.4-frankenphp/manifest / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then | ||
composer install --prefer-dist --no-progress --no-interaction | ||
fi | ||
|
||
exec docker-php-entrypoint "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
{$CADDY_GLOBAL_OPTIONS} | ||
|
||
frankenphp { | ||
{$FRANKENPHP_CONFIG} | ||
} | ||
} | ||
|
||
{$CADDY_EXTRA_CONFIG} | ||
|
||
{$SERVER_NAME:localhost} { | ||
log { | ||
output stdout | ||
format console | ||
} | ||
|
||
root * /app/public | ||
encode zstd br gzip | ||
|
||
{$CADDY_SERVER_EXTRA_DIRECTIVES} | ||
|
||
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics | ||
header ?Permissions-Policy "browsing-topics=()" | ||
|
||
php_server | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
worker { | ||
file /app/public/index.php | ||
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime | ||
} |
7 changes: 7 additions & 0 deletions
7
8.4-frankenphp/manifest/etc/supervisor/conf.d/frankenphp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[program:frankenphp] | ||
command=/usr/local/bin/frankenphp run --config /etc/caddy/Caddyfile --adapter caddyfile | ||
autostart=true | ||
autorestart=true | ||
priority=10 | ||
stdout_events_enabled=true | ||
stderr_events_enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[unix_http_server] | ||
file=/var/run/supervisor.sock ; (the path to the socket file) | ||
|
||
[supervisord] | ||
loglevel=info ; (log level;default info; others: debug,warn,trace) | ||
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | ||
nodaemon=false ; (start in foreground if true;default false) | ||
minfds=1024 ; (min. avail startup file descriptors;default 1024) | ||
minprocs=200 ; (min. avail process descriptors;default 200) | ||
user=root ; | ||
|
||
; the below section must remain in the config file for RPC | ||
; (supervisorctl/web interface) to work, additional interfaces may be | ||
; added by defining them in separate rpcinterface: sections | ||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[supervisorctl] | ||
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket | ||
|
||
; [eventlistener:stdout] | ||
; command = supervisor_stdout | ||
; buffer_size = 100 | ||
; events = PROCESS_LOG | ||
; result_handler = supervisor_stdout:event_handler | ||
|
||
[include] | ||
files = /etc/supervisor/conf.d/*.conf |
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
8.4-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
zend.max_allowed_stack_size=-1 | ||
ffi.enable=true |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
8.4-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-php.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[PHP] | ||
error_reporting = E_ALL | ||
display_errors = Off | ||
log_errors = On | ||
error_log = /proc/self/fd/2 | ||
memory_limit = -1 | ||
max_execution_time = 30 | ||
max_input_time = 30 | ||
expose_php = 0 | ||
date.timezone = UTC | ||
session_use_strict_mode = 1 | ||
session.auto_start = Off | ||
short_open_tag = Off | ||
zend.detect_unicode = 0 |
5 changes: 5 additions & 0 deletions
5
8.4-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
; maximum memory allocated to store the results | ||
realpath_cache_size=4096K | ||
|
||
; save the results for 10 minutes (600 seconds) | ||
realpath_cache_ttl=600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[apcu] | ||
apc.shm_size=128M | ||
apc.enable_cli=1 | ||
apc.rfc1867=1 | ||
; PHP file cache 1 hour | ||
apc.ttl=3600 | ||
; User cache 2 hour | ||
apc.user_ttl=7200 | ||
; Garbage collection 1 hour | ||
apc.gc_ttl=3600 | ||
; check files | ||
apc.stat=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[opcache] | ||
opcache.memory_consumption=256M | ||
opcache.max_accelerated_files=20000 | ||
opcache_enable_file_override=1 | ||
opcache.interned_strings_buffer=16 |
File renamed without changes.