Skip to content

Commit 295af9a

Browse files
committed
update
add vhosts watch
1 parent 8be46b0 commit 295af9a

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ RUN mkdir -p $GOPATH/src/github.com/miniers/docker-gen \
3535
FROM alpine:latest
3636
MAINTAINER miniers <[email protected]>
3737

38-
ARG S6_OVERLAY_VERSION=v1.21.1.1
38+
ARG S6_OVERLAY_VERSION=v1.21.2.2
3939

4040
ENV CADDY_OPTIONS ""
4141
ENV DOCKER_HOST unix:///tmp/docker.sock
4242

4343
# install s6
44-
RUN apk add --update --no-cache curl tzdata && \
44+
RUN apk add --update --no-cache curl tzdata inotify-tools && \
4545
curl -sSL https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-amd64.tar.gz \
4646
| tar xfz - -C / && \
4747
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \

plugins.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ _ "github.com/caddyserver/dnsproviders/dnspod"
66
_ "github.com/jung-kurt/caddy-cgi"
77
_ "github.com/echocat/caddy-filter"
88
_ "github.com/hacdias/caddy-webdav"
9-
_ "github.com/hacdias/filemanager/caddy/filemanager"
9+
_ "github.com/hacdias/filemanager/caddy/filemanager"
10+
_ "github.com/linkonoid/caddy-dyndns"
11+
_ "github.com/caddyserver/dnsproviders/cloudflare"

root/etc/services.d/vhosts-watch/run

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/with-contenv sh
2+
3+
while inotifywait -e modify,create,delete /root/.caddy/vhosts; do
4+
s6-svc -h /var/run/s6/services/caddy
5+
done

root/usr/bin/reload

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/with-contenv sh
22

3-
s6-svc -1 /var/run/s6/services/caddy
3+
s6-svc -h /var/run/s6/services/caddy

0 commit comments

Comments
 (0)