feat(frankenphp): prepare caddyfile for prod image
Some checks failed
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit
Some checks failed
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@@ -1,43 +1,30 @@
|
||||
# The Caddyfile is an easy way to configure FrankenPHP and the Caddy web server.
|
||||
#
|
||||
# https://frankenphp.dev/docs/config
|
||||
# https://caddyserver.com/docs/caddyfile
|
||||
{
|
||||
{
|
||||
skip_install_trust
|
||||
auto_https off
|
||||
admin off
|
||||
persist_config off
|
||||
{$CADDY_GLOBAL_OPTIONS}
|
||||
|
||||
storage file_system {$CADDY_DATA_FS:/tmp/caddy}
|
||||
|
||||
frankenphp {
|
||||
realpath_cache_size 4096K
|
||||
realpath_cache_ttl 600
|
||||
opcache.enable_cli 1
|
||||
opcache.memory_consumption 512
|
||||
opcache.max_accelerated_files 20000
|
||||
opcache.preload /app/config/preload.php
|
||||
opcache.preload_user www-data
|
||||
apc.enable_cli 1
|
||||
apc.enable 1
|
||||
|
||||
php_ini "apc.enable_cli" "{$CADDY_APC_ENABLE_CLI:1}"
|
||||
php_ini "apc.enable" "{$CADDY_APC_ENABLE:1}"
|
||||
php_ini "display_errors" "{$CADDY_DISPLAY_ERRORS:Off}"
|
||||
php_ini "display_startup_errors" "{$CADDY_DISPLAY_STARTUP_ERRORS:Off}"
|
||||
php_ini "zend.assertions" "{$CADDY_ZEND_ASSERTIONS:-1}"
|
||||
|
||||
}
|
||||
worker {
|
||||
file /app/public/index.php
|
||||
watch
|
||||
name hydra-sql-worker
|
||||
{$FRANKENPHP_WORKER_CONFIG}
|
||||
}
|
||||
{$FRANKENPHP_CONFIG}
|
||||
}
|
||||
worker {
|
||||
file /app/public/index.php
|
||||
name hydra-oidc-worker
|
||||
{$WORKER_EXTRA_CONFIG}
|
||||
}
|
||||
}
|
||||
|
||||
{$CADDY_GLOBAL_OPTIONS}
|
||||
}
|
||||
|
||||
{$CADDY_EXTRA_CONFIG}
|
||||
|
||||
root {$SERVER_ROOT:public/}
|
||||
{$SERVER_NAME:}:{$CADDY_HTTP_PORT:8080} {
|
||||
root {$SERVER_ROOT:public/}
|
||||
encode zstd br gzip
|
||||
|
||||
|
@@ -1,8 +0,0 @@
|
||||
{
|
||||
frankenphp {
|
||||
php_ini {
|
||||
opcache.validate_timestamps 0
|
||||
opcache.revalidate_freq 0
|
||||
}
|
||||
}
|
||||
}
|
@@ -48,16 +48,18 @@ ENV APP_ENV=prod \
|
||||
VERSION=${VERSION}
|
||||
|
||||
COPY ./misc/files/Caddyfile /etc/frankenphp/Caddyfile
|
||||
COPY ./misc/files/frankenphp.caddyfile-prod /etc/frankenphp/Caddyfile.d/frankenphp.caddyfile
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=composer-install /app .
|
||||
|
||||
RUN mkdir -p /tmp/caddy && chown -R 1000:1000 /tmp/caddy
|
||||
|
||||
RUN cp $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini \
|
||||
&& install-php-extensions \
|
||||
pdo_pgsql \
|
||||
pdo_mysql \
|
||||
opcache \
|
||||
apcu \
|
||||
redis
|
||||
intl \
|
||||
redis
|
Reference in New Issue
Block a user