Skip to content

Instantly share code, notes, and snippets.

@StefanScherer
Created January 27, 2018 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StefanScherer/f13a2982f8eca87513727afdfeebb5c8 to your computer and use it in GitHub Desktop.
Save StefanScherer/f13a2982f8eca87513727afdfeebb5c8 to your computer and use it in GitHub Desktop.
Jenkins Azure + SSL via Traefik and Let's Encrypt + Portainer
version: '2.1'
services:
traefik:
image: traefik:v1.5.0
ports:
- "80:80"
- "8081:8081"
- "443:443"
volumes:
- ./traefik.toml:/etc/traefik/traefik.toml
- ./data/traefik:/storage
- /var/run/docker.sock:/var/run/docker.sock
portainer:
image: portainer/portainer:1.16.1
labels:
- "traefik.backend=portainer"
- "traefik.frontend.rule=Host:portainer.yourdomain.com"
volumes:
- ./data/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
jenkins:
image: jenkinsci/jenkins:lts
labels:
- "traefik.port=8080"
- "traefik.backend=jenkins"
- "traefik.frontend.rule=Host:jenkins.yourdomain.com"
volumes:
- ./data/jenkins:/var/jenkins_home
logLevel = "DEBUG"
defaultEntryPoints = ["http", "https"]
[web]
address = ":8081"
[docker]
domain = "yourdomain.com"
watch = true
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "your@email.com"
storage = "/storage/acme.json"
entryPoint = "https"
# caServer = "https://acme-staging.api.letsencrypt.org/directory"
[acme.httpchallenge]
entrypoint="http"
[[acme.domains]]
main = "yourdomain.com"
sans = ["portainer.yourdomain.com", "jenkins.yourdomain.com" ]
@PatrickLang
Copy link

did you run this on the Jenkins master, or another node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment