forked from schottsfired/cjp-demo-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
110 lines (102 loc) · 3.24 KB
/
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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "2"
networks:
default:
external:
name: cjp-demo-environment
services:
proxy:
container_name: cjp.local
#https://hub.docker.com/_/nginx/
image: nginx:1.10-alpine
ports:
- "80:80"
#- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/logs:/var/log/nginx
depends_on: #to force proxy to start after:
- cjoc
- cje-test
- cje-prod
cjoc:
container_name: cjoc
#https://hub.docker.com/r/cloudbees/jenkins-operations-center/
image: cloudbees/jenkins-operations-center:2.138.1.2
environment:
JENKINS_SLAVE_AGENT_PORT: "50000"
JENKINS_HA: "false"
#https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
JAVA_OPTS: "
-Dhudson.TcpSlaveAgentListener.hostName=cjoc
-Dhudson.TcpSlaveAgentListener.port=50000
-Dhudson.udp=-1
-Dhudson.DNSMultiCast.disabled=true
-Djava.awt.headless=true
-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York"
JENKINS_OPTS: "--prefix=/cjoc"
volumes:
- ./data/cjoc:/var/jenkins_home
- ./data/backups:/backups
cje-prod:
container_name: cje-prod
#https://hub.docker.com/r/cloudbees/jenkins-enterprise/
image: cloudbees/jenkins-enterprise:2.138.1.2
environment:
JENKINS_SLAVE_AGENT_PORT: "50000"
JENKINS_HA: "false"
JAVA_OPTS: "
-Dhudson.TcpSlaveAgentListener.hostName=cje-prod
-Dhudson.TcpSlaveAgentListener.port=50000
-Dhudson.udp=-1
-Dhudson.DNSMultiCast.disabled=true
-Djava.awt.headless=true
-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York
"
JENKINS_OPTS: "--prefix=/cje-prod"
volumes:
- ./data/cje-prod:/var/jenkins_home
- ./data/backups:/backups
volumes_from:
- ssh-slave
cje-test:
container_name: cje-test
build:
context: ./docker/
dockerfile: Dockerfile.cje-test #based on the same image as cje-prod
environment:
JENKINS_SLAVE_AGENT_PORT: "50000"
JENKINS_HA: "false"
JAVA_OPTS: "
-Dhudson.TcpSlaveAgentListener.hostName=cje-test
-Dhudson.TcpSlaveAgentListener.port=50000
-Dhudson.udp=-1
-Dhudson.DNSMultiCast.disabled=true
-Djava.awt.headless=true
-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York
"
JENKINS_OPTS: "--prefix=/cje-test"
volumes:
- ./data/cje-test:/var/jenkins_home
- ./data/backups:/backups
volumes_from:
- ssh-slave
ssh-slave:
container_name: ssh-slave
build:
context: ./docker/
dockerfile: Dockerfile.ssh-slave
#this part is specific to your environment.. see README
command: ["${SSH_SLAVE_COMMAND}"]
volumes:
- /var/run/docker.sock:/var/run/docker.sock #aka "docker socket volume mapping"
- ${MAVEN_CACHE} #to persist and share the precious maven cache
#https://hub.docker.com/r/verb/socat/
#clever way to expose host docker engine to internal services
docker-service:
container_name: docker-service
image: verb/socat:alpine
command: tcp-listen:2375,reuseaddr,fork unix:/docker.sock
expose:
- "2375"
volumes:
- /var/run/docker.sock:/docker.sock