mirror of
https://github.com/casjaysdevdocker/caddy
synced 2026-06-24 14:01:04 -04:00
♻️ Migrate caddy to /config/ source-of-truth architecture ♻️
Remove template-files dead weight; bake configs into rootfs/tmp/etc/
and htdocs into rootfs/tmp/usr/local/share/caddy/htdocs/ so the image
carries no runtime-copy layer. On first container start, __init_service_conf
seeds /config/{svc}/ from the baked /etc/{svc}/; __update_conf_files then
symlinks /etc/{svc} -> /config/{svc}/ so /etc always reflects user config.
Flat /etc/ symlinks (php.ini, php-fpm.conf, php-fpm.d) added so all
standard lookup paths resolve through /config/php/.
- rootfs/root/docker/setup/03-files.sh: remove template-files copy blocks; remove /tmp/data handler; add /tmp/usr -> /usr handler; bump version
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: update to template version with __init_service_conf, command -v fast-exit guards on all __find_* functions
- rootfs/usr/local/etc/docker/init.d/zz-caddy.sh: __update_conf_files uses __init_service_conf + symlink /etc/caddy -> /config/caddy; seed www_dir from /usr/local/share/caddy/htdocs on first start
- rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh: __update_conf_files uses __init_service_conf + symlink /etc/php -> /config/php; add flat /etc/ symlinks for php.ini, php-fpm.conf, php-fpm.d
- rootfs/tmp/etc/caddy/Caddyfile: baked caddy config (moved from template-files)
- rootfs/tmp/etc/php/php.ini: baked PHP ini (moved from template-files)
- rootfs/tmp/etc/php/php-fpm.conf: baked PHP-FPM config (moved from template-files)
- rootfs/tmp/etc/php/php-fpm.d/www.conf: baked FPM pool config (moved from template-files)
- rootfs/tmp/usr/local/share/caddy/htdocs/www/: baked web root (moved from template-files/data)
- rootfs/usr/local/share/template-files/: deleted entirely
rootfs/root/docker/setup/03-files.sh
rootfs/tmp/
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh
rootfs/usr/local/etc/docker/init.d/zz-caddy.sh
rootfs/usr/local/share/template-files/config/caddy/Caddyfile
rootfs/usr/local/share/template-files/config/env/default.sample
rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh
rootfs/usr/local/share/template-files/config/env/examples/addresses.sh
rootfs/usr/local/share/template-files/config/env/examples/certbot.sh
rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh
rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh
rootfs/usr/local/share/template-files/config/env/examples/global.sh
rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh
rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh
rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh
rootfs/usr/local/share/template-files/config/env/examples/networking.sh
rootfs/usr/local/share/template-files/config/env/examples/other.sh
rootfs/usr/local/share/template-files/config/env/examples/php.sh
rootfs/usr/local/share/template-files/config/env/examples/postgres.sh
rootfs/usr/local/share/template-files/config/env/examples/redis.sh
rootfs/usr/local/share/template-files/config/env/examples/services.sh
rootfs/usr/local/share/template-files/config/env/examples/ssl.sh
rootfs/usr/local/share/template-files/config/env/examples/supabase.sh
rootfs/usr/local/share/template-files/config/env/examples/webservers.sh
rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh
rootfs/usr/local/share/template-files/config/.gitkeep
rootfs/usr/local/share/template-files/config/php/php-fpm.conf
rootfs/usr/local/share/template-files/config/php/php-fpm.d/www.conf
rootfs/usr/local/share/template-files/config/php/php.ini
rootfs/usr/local/share/template-files/data/.gitkeep
rootfs/usr/local/share/template-files/data/htdocs/www/404.html
rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.css
rootfs/usr/local/share/template-files/data/htdocs/www/css/cookieconsent.css
rootfs/usr/local/share/template-files/data/htdocs/www/css/errorpages.css
rootfs/usr/local/share/template-files/data/htdocs/www/css/index.css
rootfs/usr/local/share/template-files/data/htdocs/www/favicon.ico
rootfs/usr/local/share/template-files/data/htdocs/www/health/index.json
rootfs/usr/local/share/template-files/data/htdocs/www/health/index.txt
rootfs/usr/local/share/template-files/data/htdocs/www/images/403.png
rootfs/usr/local/share/template-files/data/htdocs/www/images/404.gif
rootfs/usr/local/share/template-files/data/htdocs/www/images/bg.png
rootfs/usr/local/share/template-files/data/htdocs/www/images/favicon.ico
rootfs/usr/local/share/template-files/data/htdocs/www/images/icon.png
rootfs/usr/local/share/template-files/data/htdocs/www/images/icon.svg
rootfs/usr/local/share/template-files/data/htdocs/www/index.php
rootfs/usr/local/share/template-files/data/htdocs/www/info.php
rootfs/usr/local/share/template-files/data/htdocs/www/js/app.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/bootstrap.min.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/errorpages/homepage.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/errorpages/isup.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/errorpages/loaddomain.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/errorpages/scale.fix.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/jquery/default.js
rootfs/usr/local/share/template-files/data/htdocs/www/js/passprotect.min.js
rootfs/usr/local/share/template-files/data/htdocs/www/site.webmanifest
rootfs/usr/local/share/template-files/defaults/.gitkeep
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
[www]
|
||||
user = root
|
||||
group = root
|
||||
listen = 9000
|
||||
listen.backlog = 65535
|
||||
listen.allowed_clients = 127.0.0.1
|
||||
pm = ondemand
|
||||
pm.max_children = 50
|
||||
pm.start_servers = 5
|
||||
pm.min_spare_servers = 5
|
||||
pm.max_spare_servers = 35
|
||||
pm.status_path = /status
|
||||
ping.path = /ping
|
||||
ping.response = pong
|
||||
access.log = /data/logs/php/access_log
|
||||
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
slowlog = /data/logs/php/error_log
|
||||
clear_env = no
|
||||
env[HOSTNAME] = $HOSTNAME
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
env[TMP] = /tmp
|
||||
env[TMPDIR] = /tmp
|
||||
env[TEMP] = /tmp
|
||||
php_flag[display_errors] = on
|
||||
php_admin_value[error_log] = /data/logs/php/error_log
|
||||
php_admin_flag[log_errors] = on
|
||||
php_admin_value[memory_limit] = 512M
|
||||
Reference in New Issue
Block a user