ci: emit Caddy access log per site (import accesslog) for view counts

This commit is contained in:
root 2026-07-17 10:23:59 +00:00
parent 48aa3a3dd8
commit 9e121d5716

View file

@ -193,7 +193,7 @@ runs:
echo " $(find "/srv/sites/${DOMAIN}" -type f | wc -l) files published" echo " $(find "/srv/sites/${DOMAIN}" -type f | wc -l) files published"
echo "::endgroup::" echo "::endgroup::"
write_fragment "$(printf '%s {\n\troot * /srv/sites/%s\n\tfile_server\n\ttry_files {path} /index.html\n}\n' "$SITE_ADDR" "$DOMAIN")" write_fragment "$(printf '%s {\n\timport accesslog\n\troot * /srv/sites/%s\n\tfile_server\n\ttry_files {path} /index.html\n}\n' "$SITE_ADDR" "$DOMAIN")"
# ---- optional install-script subdomain: curl get.<domain> | sh ---- # ---- optional install-script subdomain: curl get.<domain> | sh ----
# Opt-in via .env INSTALL_SH=<file in build output> (e.g. install.sh). # Opt-in via .env INSTALL_SH=<file in build output> (e.g. install.sh).
@ -264,7 +264,7 @@ runs:
echo " container $SLUG up → port $APP_PORT" echo " container $SLUG up → port $APP_PORT"
echo "::endgroup::" echo "::endgroup::"
write_fragment "$(printf '%s {\n\treverse_proxy %s:%s\n}\n' "$SITE_ADDR" "$SLUG" "$APP_PORT")" write_fragment "$(printf '%s {\n\timport accesslog\n\treverse_proxy %s:%s\n}\n' "$SITE_ADDR" "$SLUG" "$APP_PORT")"
;; ;;
*) *)
echo "::error::unknown DEPLOY=$DT (use static | docker | docker-db)"; exit 1 ;; echo "::error::unknown DEPLOY=$DT (use static | docker | docker-db)"; exit 1 ;;