Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/content/data/env-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ variables:
reference:
label: frankenphp
url: https://frankenphp.dev/docs/config/#caddyfile-config
- name: GODEBUG
default: "cgocheck=0"
variations:
- frankenphp
description: Go runtime settings for FrankenPHP. `cgocheck=0` skips Go's pointer checks on every call into PHP, like the official FrankenPHP images.
reference:
label: GODEBUG
url: https://go.dev/doc/godebug
- name: HEALTHCHECK_PATH
default: "/healthcheck"
variations:
Expand Down
2 changes: 1 addition & 1 deletion scripts/conf/php-versions-base-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
# renovate: datasource=github-releases depName=renatomefi/php-fpm-healthcheck
PHP_FPM_HEALTHCHECK_VERSION: v0.6.0
# renovate: datasource=github-releases depName=php/frankenphp
FRANKENPHP_VERSION: 1.13.4
FRANKENPHP_VERSION: 1.13.5
# Go and watcher follow FrankenPHP rather than their own releases, so bump them in the
# same pull request as FRANKENPHP_VERSION. Go matches GO_VERSION in FrankenPHP's
# docker-bake.hcl at that tag. FrankenPHP downloads the latest watcher release when it
Expand Down
1 change: 1 addition & 0 deletions scripts/tests/image/fixtures/public/font.woff2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
serversideup-php-font
8 changes: 8 additions & 0 deletions scripts/tests/image/frankenphp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ test_starts_with_every_caddy_auto_https_value() {
expect_body --https / "serversideup-php-ok:${php_version}"
done
}

# Caddy reads MIME types from /etc/mime.types (mailcap). Without it, Go's small built-in
# table has no entry for fonts, so browsers get a sniffed type and may refuse to load them.
test_serves_static_files_with_their_mime_type() {
local content_type
content_type=$(curl --silent --max-time 5 --output /dev/null --write-out '%{content_type}' "http://127.0.0.1:${host_port}/font.woff2" || true)
[ "$content_type" = "font/woff2" ] || fail "Expected /font.woff2 to be served as font/woff2, got ${content_type:-<empty>}"
}
5 changes: 3 additions & 2 deletions src/variations/frankenphp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ ARG BUILD_DEPENDENCY_PACKAGES_ALPINE="\
libstdc++ \
libxml2-dev \
linux-headers \
mailcap \
oniguruma-dev \
openssl-dev \
readline-dev \
Expand All @@ -88,7 +87,6 @@ ARG BUILD_DEPENDENCY_PACKAGES_DEBIAN="\
libsqlite3-dev \
libssl-dev \
libxml2-dev \
mailcap \
zlib1g-dev"

COPY --from=golang-image /usr/local/go /usr/local/go
Expand Down Expand Up @@ -160,9 +158,11 @@ RUN if cat /etc/os-release | grep -q 'debian'; then \
FROM common AS final
ARG DEPENDENCY_PACKAGES_ALPINE="\
libstdc++ \
mailcap \
shadow"
ARG DEPENDENCY_PACKAGES_DEBIAN="\
libstdc++6 \
mailcap \
procps \
zip"
ARG DEPENDENCY_PHP_EXTENSIONS='opcache pcntl pdo_mysql pdo_pgsql redis zip'
Expand Down Expand Up @@ -204,6 +204,7 @@ LABEL org.opencontainers.image.title="serversideup/php (frankenphp)" \
COMPOSER_MAX_PARALLEL_HTTP=24 \
DISABLE_DEFAULT_CONFIG=false \
FRANKENPHP_CONFIG="" \
GODEBUG="cgocheck=0" \
LOG_OUTPUT_LEVEL=info \
HEALTHCHECK_PATH="/healthcheck" \
PHP_DATE_TIMEZONE="UTC" \
Expand Down
Loading