-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from shyim/add-frankenphp-image
ci: add drop-in docker image for frankenphp
- Loading branch information
Showing
5 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/packages | ||
/*.rsa | ||
/*.pub | ||
/repositories | ||
/repositories | ||
/public |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
{$CADDY_GLOBAL_OPTIONS} | ||
|
||
frankenphp { | ||
#worker /path/to/your/worker.php | ||
{$FRANKENPHP_CONFIG} | ||
} | ||
|
||
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm | ||
order mercure after encode | ||
order vulcain after reverse_proxy | ||
order php_server before file_server | ||
order php before file_server | ||
} | ||
|
||
{$CADDY_EXTRA_CONFIG} | ||
|
||
{$SERVER_NAME:localhost} { | ||
#log { | ||
# # Redact the authorization query parameter that can be set by Mercure | ||
# format filter { | ||
# wrap console | ||
# fields { | ||
# uri query { | ||
# replace authorization REDACTED | ||
# } | ||
# } | ||
# } | ||
#} | ||
|
||
root * public/ | ||
encode zstd br gzip | ||
|
||
# Uncomment the following lines to enable Mercure and Vulcain modules | ||
#mercure { | ||
# # Transport to use (default to Bolt) | ||
# transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} | ||
# # Publisher JWT key | ||
# publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# # Subscriber JWT key | ||
# subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# # Allow anonymous subscribers (double-check that it's what you want) | ||
# anonymous | ||
# # Enable the subscription API (double-check that it's what you want) | ||
# subscriptions | ||
# # Extra directives | ||
# {$MERCURE_EXTRA_DIRECTIVES} | ||
#} | ||
#vulcain | ||
|
||
{$CADDY_SERVER_EXTRA_DIRECTIVES} | ||
|
||
php_server | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM ghcr.io/shyim/wolfi-php/base:latest | ||
|
||
ARG PHP_VERSION=8.2 | ||
|
||
RUN <<EOF | ||
set -eo pipefail | ||
apk add --no-cache \ | ||
curl \ | ||
frankenphp-${PHP_VERSION} | ||
EOF | ||
|
||
COPY Caddyfile /etc/caddy/Caddyfile | ||
|
||
# See https://caddyserver.com/docs/conventions#file-locations for details | ||
ENV XDG_CONFIG_HOME /config | ||
ENV XDG_DATA_HOME /data | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 | ||
EXPOSE 443/udp | ||
EXPOSE 2019 | ||
|
||
LABEL org.opencontainers.image.title=FrankenPHP | ||
LABEL org.opencontainers.image.description="The modern PHP app server" | ||
LABEL org.opencontainers.image.url=https://frankenphp.dev | ||
LABEL org.opencontainers.image.source=https://github.com/shyim/wolfi-php | ||
LABEL org.opencontainers.image.licenses=MIT | ||
LABEL org.opencontainers.image.vendor="Shyim" | ||
|
||
WORKDIR /app | ||
EXPOSE 8000 | ||
|
||
ENTRYPOINT [ "/usr/bin/frankenphp", "run" ] | ||
CMD [ "--config", "/etc/caddy/Caddyfile" ] | ||
HEALTHCHECK CMD curl -f http://localhost:2019/metrics || exit 1 |