mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-21 04:23:15 +01:00
Each application host now selects how its TLS certificate is issued: self-signed, ACME HTTP challenge, or ACME DNS challenge using a stored DNS credential. ACME modes fall back to the internal CA when issuance fails, so hosts stay reachable with a browser warning instead of a TLS error. - Add DnsChallengeCredential model and provider registry (Cloudflare) - Add certificate_type and dns_credential to ApplicationHost - Sync WireGuard WebAdmin hosts from .env into the reserved application - Export per-host TLS settings to tls.json, read only by Caddy - Group hosts by certificate settings into separate Caddy site blocks - Build Caddy with the Cloudflare DNS module using xcaddy - Regenerate the Caddyfile without DNS challenge if validation fails
26 lines
803 B
Plaintext
26 lines
803 B
Plaintext
# Compiled natively for the target platform to avoid slow emulated Go builds.
|
|
# DNS provider modules must match app_gateway/dns_providers.py
|
|
FROM --platform=$BUILDPLATFORM caddy:2-builder AS builder
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=${TARGETVARIANT#v} xcaddy build \
|
|
--with github.com/caddy-dns/cloudflare
|
|
|
|
FROM caddy:2
|
|
|
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
|
|
|
RUN apk add --no-cache \
|
|
python3 \
|
|
inotify-tools \
|
|
bash
|
|
|
|
COPY export_wireguard_webadmin_config.py /usr/local/bin/export_wireguard_webadmin_config.py
|
|
COPY process_config.py /usr/local/bin/process_config.py
|
|
COPY entrypoint.sh /usr/local/bin/caddy-entrypoint.sh
|
|
|
|
RUN chmod +x /usr/local/bin/caddy-entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/caddy-entrypoint.sh"]
|