Skip to content

Instantly share code, notes, and snippets.

@obcode
Created July 12, 2019 10:14
Show Gist options
  • Select an option

  • Save obcode/39eb9e0c3941cbeee099c720f280c0e0 to your computer and use it in GitHub Desktop.

Select an option

Save obcode/39eb9e0c3941cbeee099c720f280c0e0 to your computer and use it in GitHub Desktop.
version: "3"
services:
jenkins:
# image: jenkins/jenkins:lts
build:
context: .
dockerfile: jenkins.dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/jenkins:/var/jenkins_home
- /usr/bin/docker:/usr/bin/docker:ro
- /home/obraun/jenkins_bin:/home/bin:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=terraform.cs.hm.edu
- VIRTUAL_PORT=8080
- JAVA_OPTS=-Dmail.smtp.starttls.enable=true
links:
- mailrelay
restart: always
networks:
- backend
nginx-jenkins:
image: "jwilder/nginx-proxy:alpine"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /home/obraun/certs:/etc/nginx/certs:ro
ports:
- 80:80
- 443:443
depends_on:
- jenkins
networks:
- frontend
- backend
restart: always
registry:
image: registry:2
volumes:
- /home/registry:/var/lib/registry
ports:
- 127.0.0.1:5000:5000
networks:
- backend
restart: always
nginx-registry:
# Note : Only nginx:alpine supports bcrypt.
# If you don't need to use bcrypt, you can use a different tag.
# Ref. https://github.com/nginxinc/docker-nginx/issues/29
image: "nginx:alpine"
ports:
- 5043:5443
links:
- registry:registry
volumes:
- /home/obraun/nginx-registry:/etc/nginx/conf.d:ro
- /home/obraun/nginx-registry/nginx.conf:/etc/nginx/nginx.conf:ro
- /home/obraun/certs:/etc/nginx/certs:ro
networks:
- frontend
- backend
depends_on:
- registry
restart: always
networks:
frontend:
backend:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment