add php-fpm entrypoint file
This commit is contained in:
parent
78bf02e367
commit
b7c85fdda4
@ -12,6 +12,7 @@ COPY --from=caddy /data /data
|
|||||||
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
|
||||||
COPY Caddyfile /etc/caddy/
|
COPY Caddyfile /etc/caddy/
|
||||||
|
|
||||||
|
COPY config $PHP_INI_DIR/conf.d
|
||||||
COPY php-fpm /usr/local/etc/php-fpm.d
|
COPY php-fpm /usr/local/etc/php-fpm.d
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
|||||||
7
caddy2/php7.4-debian/config/opcache.ini
Normal file
7
caddy2/php7.4-debian/config/opcache.ini
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
opcache.enable=1
|
||||||
|
|
||||||
|
opcache.memory_consumption=256
|
||||||
|
opcache.interned_strings_buffer=16
|
||||||
|
opcache.fast_shutdown=1
|
||||||
|
|
||||||
|
opcache.validate_timestamps=1
|
||||||
2
caddy2/php7.4-debian/config/upload.ini
Normal file
2
caddy2/php7.4-debian/config/upload.ini
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
post_max_size=100M
|
||||||
|
upload_max_filesize=100M
|
||||||
20
caddy2/php7.4-debian/php-caddy-entrypoint
Normal file
20
caddy2/php7.4-debian/php-caddy-entrypoint
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
FPM_CONFIG_DIR=/usr/local/etc/php-fpm.d
|
||||||
|
|
||||||
|
read_env_config() {
|
||||||
|
prefix=$1
|
||||||
|
output=$2
|
||||||
|
|
||||||
|
env | grep -E "^$prefix\..+=.+" | while IFS='=' read -r config_name config_value; do
|
||||||
|
echo "${config_name#*.} = $config_value" >> "$output"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
read_env_config PHP $PHP_INI_DIR/conf.d/zz-docker-env.ini
|
||||||
|
read_env_config PHP_FPM $FPM_CONFIG_DIR/zz-docker.conf
|
||||||
|
|
||||||
|
php-fpm -D
|
||||||
|
exec "$@"
|
||||||
Loading…
Reference in New Issue
Block a user