-
Notifications
You must be signed in to change notification settings - Fork 0
/
traefik.docker-compose.yml
37 lines (32 loc) · 1.16 KB
/
traefik.docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: "3"
volumes:
jenkins_data: {}
services:
jenkins:
build:
context: ./
container_name: jenkins
volumes:
- jenkins_data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
networks:
- public
labels:
- "traefik.enable=true"
# frontend
- "traefik.http.routers.jenkins_frontend.service=jenkins_frontend"
- "traefik.http.routers.jenkins_frontend.rule=Host(`${TRAEFIK_PROXY_URL}`)"
- "traefik.http.routers.jenkins_frontend.entrypoints=websecure"
- "traefik.http.routers.jenkins_frontend.tls.certresolver=tlsresolver"
- "traefik.http.services.jenkins_frontend.loadbalancer.server.port=8080"
# agent
- "traefik.http.routers.jenkins_agent.service=jenkins_agent"
- "traefik.http.routers.jenkins_agent.rule=Host(`${TRAEFIK_PROXY_URL}`) && Path(`/agent`)"
- "traefik.http.routers.jenkins_agent.entrypoints=websecure"
- "traefik.http.routers.jenkins_agent.tls.certresolver=tlsresolver"
- "traefik.http.services.jenkins_agent.loadbalancer.server.port=50000"
restart: unless-stopped
networks:
public:
external:
name: ${TRAEFIK_PUBLIC_NETWORK}