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:
@@ -10,7 +10,7 @@ services:
|
||||
hydra-sql:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./misc/images/hydra-sql-dev/Dockerfile
|
||||
dockerfile: ./misc/images/hydra-sql-standalone/Dockerfile
|
||||
args:
|
||||
- SERVER_NAME=http://localhost:10500
|
||||
links:
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
develop:
|
||||
watch:
|
||||
- action: rebuild
|
||||
path: ./misc/images/hydra-sql-dev
|
||||
path: ./misc/images/hydra-sql-standalone
|
||||
- action: rebuild
|
||||
path: ./misc/files
|
||||
- action: rebuild
|
||||
@@ -70,8 +70,8 @@ services:
|
||||
hydra:
|
||||
condition: service_healthy
|
||||
network_mode: host
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
hydra:
|
||||
image: cadoles/hydra-v1:v0.0.0-151-gc9c6fb1
|
||||
volumes:
|
||||
|
@@ -9,7 +9,6 @@
|
||||
"ext-iconv": "*",
|
||||
"runtime/frankenphp-symfony": "^0.2.0",
|
||||
"sentry/sentry-symfony": "^5",
|
||||
"symfony/apache-pack": "^1.0",
|
||||
"symfony/asset": "6.4.*",
|
||||
"symfony/console": "6.4.*",
|
||||
"symfony/dependency-injection": "6.4.*",
|
||||
|
@@ -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 {
|
||||
worker {
|
||||
file /app/public/index.php
|
||||
name hydra-sql-worker
|
||||
{$FRANKENPHP_WORKER_CONFIG}
|
||||
}
|
||||
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 \
|
||||
intl \
|
||||
redis
|
Reference in New Issue
Block a user