-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load custom Caddyfile from embedded app if it exists #494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement!
I left some minor comments.
Thank you! |
Could you guys provide a simple explanation how it works? i'm using the latest builder to add caddy-exec module, created a Caddyfile in my application root folder (/app/Caddyfile) but doesn't see to work This is my code: Dockerfile: FROM dunglas/frankenphp:latest-builder AS builder
# Copy xcaddy in the builder image
COPY --from=caddy:builder /usr/bin/xcaddy /usr/bin/xcaddy
# CGO must be enabled to build FrankenPHP
ENV CGO_ENABLED=1 XCADDY_SETCAP=1 XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'"
RUN xcaddy build \
--output /usr/local/bin/frankenphp \
--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy \
--with github.com/abiosoft/caddy-exec
FROM dunglas/frankenphp AS runner
ENV SERVER_NAME=:80
COPY . /app
WORKDIR /app
# Replace the official binary by the one contained your custom modules
COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp Caddyfile
Logs:
Should my Caddyfile be same as default and may i change adding these module commands? |
Use the embedded
Caddyfile
if the embedded app contains aCaddyfile
at the rootFixes #413