Replies: 3 comments
-
Hi, there is my Caddy file related to Shaarli
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @adriy-be, thanks for your answer but you are using Caddy as a reverse proxy for shaarli and not as a web server ! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok I see, there is an example with PHP, that make long time I don't update it and it's messy. Hope that should help :) #Dockerfile
FROM caddy:2.10.0-builder-alpine AS builder
RUN xcaddy build \
--with github.com/caddy-dns/cloudflare
FROM caddy:2.10.0-alpine AS caddyRun
ARG PUID="1000"
ARG PGID="1000"
RUN apk add --no-cache --update \
openrc \
php82 \
php82-session \
php82-curl \
php82-json \
php82-fpm \
php82-openssl \
curl
RUN addgroup -g ${PGID} www-user && \
adduser -D -H -u ${PUID} -G www-user www-user && \
sed -i "s|^user = .*|user = www-user|g" /etc/php82/php-fpm.d/www.conf && \
sed -i "s|^group = .*|group = www-user|g" /etc/php82/php-fpm.d/www.conf
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
EXPOSE 80
EXPOSE 443
EXPOSE 2019
VOLUME /etc/caddy
VOLUME /data/caddy/certificates
VOLUME /app/
WORKDIR /app/
COPY run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/run.sh \
&& ln -s /usr/local/bin/run.sh /
ENTRYPOINT [ "run.sh" ] #!/bin/sh
# run.sh
php-fpm82 -D
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
my.ndd:443 {
root * /app/html
file_server {
browse
}
php_fastcgi * localhost:9000
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am trying to use caddy instead of nginx and I want to host Shaarli using Caddy as a web server. Has anyone managed to do that? It could also be interesting to put a config sample in the docs!
Beta Was this translation helpful? Give feedback.
All reactions