Auto reload caddy and add basicauth example (#1706)

* add live reload and basicauth
This commit is contained in:
ahkui
2018-08-26 16:02:55 +08:00
committed by Shao Yu-Lung (Allen)
parent aa84dd8616
commit 947a791ad2
5 changed files with 13 additions and 5 deletions

View File

@ -6,12 +6,14 @@ ARG plugins="cors"
## ARG plugins="cors cgi cloudflare azure linode"
RUN caddyplug install ${plugins}
RUN apk add --no-cache inotify-tools \
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
&& chmod +x /start.sh
EXPOSE 80 443 2015
WORKDIR /var/www/public
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile","-agree"]
CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"]