version: '3.7'

networks:
  traefik_traefik-network:
    external: true

services:
  jenkins:
    image: jenkins/jenkins:lts
    container_name: jenkins
    restart: always
    networks:
      - traefik_traefik-network
    privileged: true
    user: [[USER]]
    volumes:
      - /pwspool/software/jenkins:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/local/bin/docker:/usr/local/bin/docker
    labels:
      - traefik.http.routers.jenkins.rule=Host(`[[SITE_URL]]`)
      - traefik.http.routers.jenkins.tls=true
      - traefik.http.routers.jenkins.tls.certresolver=lets-encrypt
      - traefik.http.services.jenkins.loadbalancer.server.port=8080
      - traefik.port=8080

