This repository was archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (76 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (76 loc) · 2.3 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: "3.7"
services:
proxy:
image: dockerflow/docker-flow-proxy
ports:
- "80:80"
- "443:443"
networks:
- proxy
environment:
- LISTENER_ADDRESS=swarm-listener
- MODE=swarm
swarm-listener:
image: dockerflow/docker-flow-swarm-listener
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DF_NOTIFY_CREATE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/reconfigure
- DF_NOTIFY_REMOVE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/remove
deploy:
placement:
constraints: [node.role == manager]
jenkins:
image: shazchaudhry/docker-jenkins:latest
user: root
environment:
- JENKINS_OPTS='--prefix=/jenkins'
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- jenkins_home:/var/jenkins_home
secrets: # See how secrets are used in this jenkins image at: https://github.com/shazChaudhry/docker-jenkins/blob/master/config/security.groovy
- jenkins-user
- jenkins-pass
deploy:
labels:
- com.df.port=8080
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/jenkins
jenkins_slave:
image: vfarcic/jenkins-swarm-agent
environment:
- USER_NAME_SECRET=/run/secrets/${JENKINS_USER_SECRET:-jenkins-user}
- PASSWORD_SECRET=/run/secrets/${JENKINS_PASS_SECRET:-jenkins-pass}
# See slave options at: https://wiki.jenkins.io/display/JENKINS/Swarm+Plugin
- COMMAND_OPTIONS=-master http://jenkins:8080/jenkins/ -description slave -mode exclusive -name slave -labels slave -executors 2
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- jenkins_slave_workspace:/workspace
secrets:
- jenkins-user
- source: jenkins-pass
mode: 0400
deploy:
mode: global
secrets:
jenkins-pass:
external: true
jenkins-user:
external: true
volumes:
jenkins_home:
# See 'REX-Ray Docker volume plug-ins' documentaion; volume available across entire docker swarm cluster
# https://rexray.readthedocs.io/en/v0.9.0/user-guide/docker-plugins/#elastic-block-service
# driver: rexray/ebs
# driver_opts:
# size: 5
jenkins_slave_workspace:
networks:
proxy: