-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (47 loc) · 1.18 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: '3.8'
x-certbot-common: &certbot-common
image: coryaent/certbot:master
secrets:
- gandi_certbot_ini
volumes:
- certificates:/etc/letsencrypt/
environment:
CERTBOT_EMAIL: [email protected]
CERTBOT_AUTHENTICATOR: dns-gandi
CERTBOT_GANDI_CREDENTIALS_FILE: /run/secrets/gandi_certbot_ini
CERTBOT_DOMAINS: "{{.Node.Hostname}}.example.com"
services:
initialize:
<<: *certbot-common
command: certonly --agree-tos --staging -n
configs:
- source: certbot_init_ini
target: /etc/letsencrypt/cli.ini
deploy:
mode: global-job
renew:
<<: *certbot-common
command: renew --agree-tos --staging -n
configs:
- source: certbot_renew_ini
target: /etc/letsencrypt/cli.ini
deploy:
mode: global
labels:
- "swarm.cronjob.enable=true"
- "swarm.cronjob.schedule=43 36 20 * * *" # 08:36:43 PM
- "swarm.cronjob.skip-running=false"
restart_policy:
condition: none
configs:
certbot_init_ini:
external: true
certbot_renew_ini:
external: true
secrets:
gandi_certbot_ini:
external: true
volumes:
certificates:
driver: local
name: certificates