proxy: Use own Dockerfile

+ Download prebuild caddy
+ Always set ca url
This commit is contained in:
Carsten Sprung 2020-02-02 18:21:44 +01:00
parent d3aa872415
commit f77c991e87
3 changed files with 39 additions and 4 deletions

View file

@ -1,3 +1,36 @@
FROM abiosoft/caddy:no-stats #
# DOWNLOAD
#
FROM alpine:3.11 as download
RUN apk add --no-cache hugo ADD https://caddyserver.com/download/linux/amd64?plugins=http.git&license=personal&telemetry=off /caddy.tar.gz
RUN tar -vxzf /caddy.tar.gz
#
# CADDY
#
FROM alpine:3.11
LABEL maintainer "Carsten Sprung <carsten.sprung@csprung.de>"
# Telemetry Stats
ENV ENABLE_TELEMETRY="false"
RUN apk add --no-cache \
ca-certificates \
git \
mailcap \
openssh-client \
tzdata \
hugo
COPY --from=download /caddy /usr/bin/caddy
# validate install
RUN /usr/bin/caddy -version
RUN /usr/bin/caddy -plugins
EXPOSE 80 443 2015
WORKDIR /srv
ENTRYPOINT ["/usr/bin/caddy"]
CMD ["--conf", "/etc/Caddyfile", "--env", "--log", "stdout", "--agree=true", "--disable-tls-alpn-challenge"]

View file

@ -1,4 +1,6 @@
log / stdout "{host} - {common}" log / stdout "{host} - {common}"
errors stdout errors stdout
tls {$TLS_EMAIL} tls {$TLS_EMAIL} {
ca {$CA_URL}
}
gzip gzip

View file

@ -15,8 +15,8 @@ services:
environment: environment:
- BASE_DOMAIN=${BASE_DOMAIN} - BASE_DOMAIN=${BASE_DOMAIN}
- CADDYPATH=/etc/caddycerts - CADDYPATH=/etc/caddycerts
- ACME_AGREE=true
- TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed} - TLS_EMAIL=${CADDY_TLS_EMAIL:-self_signed}
- CA_URL=${CADDY_CA_URL}
- DEV_PASS=${CADDY_DEV_PASS} - DEV_PASS=${CADDY_DEV_PASS}
ports: ports:
- '80:80' - '80:80'