added first config
This commit is contained in:
commit
91cdb9ba56
9
Caddyfile.tmpl
Normal file
9
Caddyfile.tmpl
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
acme_dns desec {
|
||||
token {env.GANDI_BEARER_TOKEN}
|
||||
}
|
||||
|
||||
test.com {
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
}
|
||||
9
Containerfile
Normal file
9
Containerfile
Normal file
@ -0,0 +1,9 @@
|
||||
ARG CADDY_VERSION=2
|
||||
FROM caddy:${CADDY_VERSION}-builder AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/desec
|
||||
|
||||
FROM caddy:${CADDY_VERSION}
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
0
caddy-config.volume
Normal file
0
caddy-config.volume
Normal file
0
caddy-data.volume
Normal file
0
caddy-data.volume
Normal file
7
caddy.build
Normal file
7
caddy.build
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Build caddy image with desec.io DNS plugin
|
||||
|
||||
[Build]
|
||||
File=%h/container/caddy/Containerfile
|
||||
ImageTag=caddy-gandi:latest
|
||||
SetWorkingDirectory=unit
|
||||
23
caddy.container
Normal file
23
caddy.container
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Caddy reverse proxy (Desec.io DNS challenge)
|
||||
|
||||
[Container]
|
||||
Image=caddy.build
|
||||
ContainerName=caddy
|
||||
PublishPort=8080:80
|
||||
PublishPort=8443:443
|
||||
Volume=./Caddyfile:/etc/caddy/Caddyfile:ro,Z
|
||||
Volume=caddy-data:/data
|
||||
Volume=caddy-config:/config
|
||||
|
||||
Secret=desec-token,type=env,target=GANDI_BEARER_TOKEN
|
||||
|
||||
# For ACME notifications
|
||||
EnvironmentFile=./config.env
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
1
config.env.tmpl
Normal file
1
config.env.tmpl
Normal file
@ -0,0 +1 @@
|
||||
ACME_EMAIL=admin@test.com
|
||||
Loading…
x
Reference in New Issue
Block a user