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:
|
hydra-sql:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./misc/images/hydra-sql-dev/Dockerfile
|
dockerfile: ./misc/images/hydra-sql-standalone/Dockerfile
|
||||||
args:
|
args:
|
||||||
- SERVER_NAME=http://localhost:10500
|
- SERVER_NAME=http://localhost:10500
|
||||||
links:
|
links:
|
||||||
@@ -21,7 +21,7 @@ services:
|
|||||||
develop:
|
develop:
|
||||||
watch:
|
watch:
|
||||||
- action: rebuild
|
- action: rebuild
|
||||||
path: ./misc/images/hydra-sql-dev
|
path: ./misc/images/hydra-sql-standalone
|
||||||
- action: rebuild
|
- action: rebuild
|
||||||
path: ./misc/files
|
path: ./misc/files
|
||||||
- action: rebuild
|
- action: rebuild
|
||||||
@@ -70,8 +70,8 @@ services:
|
|||||||
hydra:
|
hydra:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
hydra:
|
hydra:
|
||||||
image: cadoles/hydra-v1:v0.0.0-151-gc9c6fb1
|
image: cadoles/hydra-v1:v0.0.0-151-gc9c6fb1
|
||||||
volumes:
|
volumes:
|
||||||
|
@@ -9,7 +9,6 @@
|
|||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
"runtime/frankenphp-symfony": "^0.2.0",
|
"runtime/frankenphp-symfony": "^0.2.0",
|
||||||
"sentry/sentry-symfony": "^5",
|
"sentry/sentry-symfony": "^5",
|
||||||
"symfony/apache-pack": "^1.0",
|
|
||||||
"symfony/asset": "6.4.*",
|
"symfony/asset": "6.4.*",
|
||||||
"symfony/console": "6.4.*",
|
"symfony/console": "6.4.*",
|
||||||
"symfony/dependency-injection": "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
|
skip_install_trust
|
||||||
auto_https off
|
auto_https off
|
||||||
admin off
|
admin off
|
||||||
persist_config off
|
persist_config off
|
||||||
{$CADDY_GLOBAL_OPTIONS}
|
storage file_system {$CADDY_DATA_FS:/tmp/caddy}
|
||||||
|
|
||||||
|
|
||||||
frankenphp {
|
frankenphp {
|
||||||
realpath_cache_size 4096K
|
php_ini "apc.enable_cli" "{$CADDY_APC_ENABLE_CLI:1}"
|
||||||
realpath_cache_ttl 600
|
php_ini "apc.enable" "{$CADDY_APC_ENABLE:1}"
|
||||||
opcache.enable_cli 1
|
php_ini "display_errors" "{$CADDY_DISPLAY_ERRORS:Off}"
|
||||||
opcache.memory_consumption 512
|
php_ini "display_startup_errors" "{$CADDY_DISPLAY_STARTUP_ERRORS:Off}"
|
||||||
opcache.max_accelerated_files 20000
|
php_ini "zend.assertions" "{$CADDY_ZEND_ASSERTIONS:-1}"
|
||||||
opcache.preload /app/config/preload.php
|
|
||||||
opcache.preload_user www-data
|
|
||||||
apc.enable_cli 1
|
|
||||||
apc.enable 1
|
|
||||||
|
|
||||||
|
|
||||||
}
|
worker {
|
||||||
worker {
|
file /app/public/index.php
|
||||||
file /app/public/index.php
|
name hydra-oidc-worker
|
||||||
watch
|
{$WORKER_EXTRA_CONFIG}
|
||||||
name hydra-sql-worker
|
}
|
||||||
{$FRANKENPHP_WORKER_CONFIG}
|
|
||||||
}
|
|
||||||
{$FRANKENPHP_CONFIG}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{$CADDY_GLOBAL_OPTIONS}
|
||||||
}
|
}
|
||||||
|
|
||||||
{$CADDY_EXTRA_CONFIG}
|
{$CADDY_EXTRA_CONFIG}
|
||||||
|
|
||||||
root {$SERVER_ROOT:public/}
|
{$SERVER_NAME:}:{$CADDY_HTTP_PORT:8080} {
|
||||||
root {$SERVER_ROOT:public/}
|
root {$SERVER_ROOT:public/}
|
||||||
encode zstd br gzip
|
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}
|
VERSION=${VERSION}
|
||||||
|
|
||||||
COPY ./misc/files/Caddyfile /etc/frankenphp/Caddyfile
|
COPY ./misc/files/Caddyfile /etc/frankenphp/Caddyfile
|
||||||
COPY ./misc/files/frankenphp.caddyfile-prod /etc/frankenphp/Caddyfile.d/frankenphp.caddyfile
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=composer-install /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 \
|
RUN cp $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini \
|
||||||
&& install-php-extensions \
|
&& install-php-extensions \
|
||||||
pdo_pgsql \
|
pdo_pgsql \
|
||||||
pdo_mysql \
|
pdo_mysql \
|
||||||
opcache \
|
opcache \
|
||||||
apcu \
|
apcu \
|
||||||
|
intl \
|
||||||
redis
|
redis
|
Reference in New Issue
Block a user