# 
# https://hub.docker.com/r/jenkins/jenkins
# https://github.com/jenkinsci/docker/blob/master/README.md
# https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-with-jenkins/reverse-proxy-configuration-apache/
# https://gist.github.com/avecchio/6d02c0038b6d81a48581
# 
services:
  sbc-capital-jenkins:
    image: sbc-capital-jenkins:latest
    container_name: sbc-capital-jenkins
    hostname: sbc-capital-jenkins  
    ports:
      - "9080:8080"
      - "50000:50000"
    volumes:
      - sbc-capital-jenkins-home:/var/jenkins_home
    restart: on-failure    
    networks:
      - sbc-capital-net
    extra_hosts:
      - "sbc-capital-nyc:${HOST_DOCKER_IP}"
    environment:
      JENKINS_OPTS: "--prefix=/"

  sbc-capital-jenkins-ssh-agent:
    image: jenkins/ssh-agent
    container_name: sbc-capital-jenkins-ssh-agent
    hostname: sbc-capital-jenkins-ssh-agent
    networks:
      - sbc-capital-net  
    extra_hosts:
      - "sbc-capital-nyc:${HOST_DOCKER_IP}"      

volumes:
  sbc-capital-jenkins-home:
    external: true
    
networks:
  sbc-capital-net:
    external: true