Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bernhardkaindl/ecfced5a79e774d5ad81d0604b23abd0 to your computer and use it in GitHub Desktop.
Save bernhardkaindl/ecfced5a79e774d5ad81d0604b23abd0 to your computer and use it in GitHub Desktop.
Docker Swarm stack for LetsEncrypt CertBot and Oracle OCI registration
version: '3.6'
volumes:
certs-repo:
driver: s3fs
name: "certs"
services:
nginx:
image: registry.mydomain.com/letsencrypt:1.19.3
command: sleep 1d
volumes:
- certs-repo:/etc/letsencrypt
environment:
OCID: ocid1.loadbalancer.oc1.iad........
RENEWED_DOMAINS: dev-oci.servehttp.com
deploy:
mode: replicated
replicas: 0
restart_policy:
condition: none
labels:
- traefik.enable=true
- traefik.docker.network=lb_network
- traefik.constraint-label=traefik-public
- traefik.http.routers.reg-http.rule=PathPrefix(`/.well-known/acme-challenge/`)
- traefik.http.routers.reg-http.entrypoints=http
- traefik.http.services.reg.loadbalancer.server.port=80
networks:
- lb_network
renew:
image: registry.mydomain.com/letsencrypt:1.19.3
command: /renew-certs.sh
volumes:
- certs-repo:/etc/letsencrypt
deploy:
mode: replicated
replicas: 0
restart_policy:
condition: none
labels:
- traefik.enable=true
- traefik.docker.network=lb_network
- traefik.constraint-label=traefik-public
- traefik.http.routers.reg-http.rule=PathPrefix(`/.well-known/acme-challenge/`)
- traefik.http.routers.reg-http.entrypoints=http
- traefik.http.services.reg.loadbalancer.server.port=80
networks:
- lb_network
networks:
lb_network:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment