Skip to content

Commit e68132b

Browse files
authored
feat: test caddy digitalocean dns (#48)
1 parent 4fca697 commit e68132b

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

ansible/roles/docker-swarm-app-caddy/assets/Caddyfile

+6
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,9 @@
5252
auth.{{domain}} {
5353
authenticate with myportal
5454
}
55+
56+
(external_dns) {
57+
tls {
58+
dns digitalocean {env.DIGITALOCEAN_API_TOKEN}
59+
}
60+
}

ansible/roles/docker-swarm-app-caddy/assets/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG CADDY_VERSION=2.8.4
1+
ARG CADDY_VERSION=2.9.1
22
FROM caddy:${CADDY_VERSION}-builder-alpine AS builder
33

44
RUN xcaddy build \

ansible/roles/docker-swarm-app-caddy/assets/caddy-stack.yml

+12
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ services:
5454
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}' }}"
5555
caddy.authorize: with admins_policy
5656

57+
whoami-dns:
58+
# A container that exposes an API to show its IP address
59+
image: containous/whoami
60+
networks:
61+
- caddy
62+
deploy:
63+
labels:
64+
caddy: whoami-dns.{{domain}}
65+
caddy.import: external_dns
66+
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}' }}"
67+
68+
5769
volumes:
5870
caddy_data:
5971
caddy_config:

0 commit comments

Comments
 (0)