Forked from marcelo-ochoa/docker-compose-letsencrypt.yml
Created
August 20, 2024 14:08
-
-
Save bernhardkaindl/ecfced5a79e774d5ad81d0604b23abd0 to your computer and use it in GitHub Desktop.
Docker Swarm stack for LetsEncrypt CertBot and Oracle OCI registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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