/
docker-compose.yml
219 lines (210 loc) · 6.03 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
version: '3.7'
networks:
extnet:
name: ehw2018.local
intnet:
name: ehw2018-internal.local
services:
# see: https://github.com/Fmstrat/samba-domain
samba:
image: nowsci/samba-domain
container_name: samba
volumes:
#- /etc/localtime:/etc/localtime:ro
- ${CONF_DIR}/samba/data/:/var/lib/samba
- ${CONF_DIR}/samba/config/samba:/etc/samba/external
environment:
- DOMAIN=EHW2018.LOCAL
- DOMAINPASS=${AD_DOMAIN_PASSWORD}
- JOIN=false
- INSECURELDAP:true
#- DNSFORWARDER=${EXT_DNS_ADDR}
networks:
- extnet
ports:
- ${ADS_ADDR}:53:53
- ${ADS_ADDR}:53:53/udp
- ${ADS_ADDR}:88:88
- ${ADS_ADDR}:88:88/udp
- ${ADS_ADDR}:135:135
- ${ADS_ADDR}:137-138:137-138/udp
- ${ADS_ADDR}:139:139
- ${ADS_ADDR}:389:389
- ${ADS_ADDR}:389:389/udp
- ${ADS_ADDR}:445:445
- ${ADS_ADDR}:464:464
- ${ADS_ADDR}:464:464/udp
- ${ADS_ADDR}:636:636
- ${ADS_ADDR}:1024-1044:1024-1044
- ${ADS_ADDR}:3268-3269:3268-3269
dns_search:
- ehw2018.local
dns:
- ${ADS_ADDR}
#- ${EXT_DNS_ADDR}
extra_hosts:
- localdc.ehw2018.local:${ADS_ADDR}
hostname: localdc
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
privileged: true
restart: always
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.ehw2018.local'
#environment:
#GITLAB_OMNIBUS_CONFIG: |
# external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
networks:
- extnet
ports:
- "${GITLAB_ADDR}:80:80"
- "${GITLAB_ADDR}:443:443"
- "${GITLAB_ADDR}:10022:22"
volumes:
- '${CONF_DIR}/gitlab/config:/etc/gitlab'
- '${CONF_DIR}/gitlab/logs:/var/log/gitlab'
- '${CONF_DIR}/gitlab/data:/var/opt/gitlab'
links:
- samba
- registry
gitlab-runner:
image: gitlab/gitlab-runner:latest
restart: always
hostname: gitlab-runner.ehw2018.local
networks:
- extnet
container_name: gitlab-runner.ehw2810
volumes:
- '${CONF_DIR}/gitlab-runner:/etc/gitlab-runner'
- '/var/run/docker.sock:/var/run/docker.sock'
depends_on:
- gitlab
links:
- registry
# jenkins:
# image: 'jenkins/jenkins:lts'
# networks:
# - extnet
# ports:
# - "${JENKINS_ADDR}:8080:8080"
# volumes:
# - '${CONF_DIR}/jenkins/data:/var/jenkins_home'
# links:
# - samba
# - registry
##
# che:
# image: 'eclipse/che'
# command: "start"
# environment:
# - CHE_HOST=${CHE_ADDR}
# - CHE_PORT=28080
# networks:
# - extnet
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - '${CONF_DIR}/che/data:/data'
# links:
# - samba
# - gitlab
#
rancher:
image: 'rancher/rancher:v2.1.5'
restart: unless-stopped
networks:
- extnet
ports:
- "${RANCHER_ADDR}:8080:80"
- "${RANCHER_ADDR}:8443:443"
- "${HOST1_ADDR}:38443:443"
volumes:
- '${CONF_DIR}/rancher/mysql:/var/lib/mysql'
links:
- samba
- gitlab
# - jenkins
- registry
extra_hosts:
- "localdc.ehw2018.local:192.168.3.222"
environment:
- CATTLE_AGENT_IP=${HOST1_ADDR}
# cadvisor:
# image: google/cadvisor:latest
# restart: always
# networks:
# - intnet
# ports:
# - 8080
# volumes:
# - /:/rootfs:ro
# - /var/run:/var/run:ro
# - /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
# - /dev/disk/:/dev/disk:ro
# tty: true
# stdin_open: true
#
# prometheus:
# image: prom/prometheus
# command:
# - --config.file=/etc/prometheus/prometheus.yml
# restart: always
# networks:
# - extnet
# - intnet
# ports:
# - 9090:9090
# volumes:
# - '${CONF_DIR}/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
# links:
# - cadvisor
#
# nginx-reverse-proxy:
# image: nginx:1.15.7-alpine
# volumes:
# #- ./mysite.template:/etc/nginx/conf.d/mysite.template
# #- '${CONF_DIR}/nginx-reverse-proxy/conf/nginx.conf':/etc/nginx/conf/nginx.conf
# - '${CONF_DIR}/nginx-reverse-proxy/conf.d/:/etc/nginx/conf.d/'
# networks:
# - extnet
# - intnet
# ports:
# - "${RP_ADDR}:18080:80"
# environment:
# # - NGINX_HOST=internal.ehw2018.io
# - NGINX_PORT=80
# #command: /bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
# links:
# - nginx-ldap-auth
# command: nginx -g 'daemon off;'
#
# nginx-ldap-auth:
# image: nginx-ldap-auth:latest
# networks:
# - extnet
# - intnet
# expose:
# - 88888888888
# links:
# - samba
# command: python /usr/src/app/nginx-ldap-auth-daemon.py --host 0.0.0.0 --port 8888 --url ldap://samba.my-external-net --starttls true -b 'DC=ehw2018,DC=local' -D 'CN=Administrator,CN=Users,DC=ehw2018,DC=local' -w 'P@ssw0rd'
registry:
image: registry:2.6
container_name: registry
environment:
REGISTRY_HTTP_ADDR: 0.0.0.0:443
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt
REGISTRY_HTTP_TLS_KEY: /certs/domain.key
volumes:
- ${CONF_DIR}/registry/var/private-registry:/var/lib/registry
- ${CONF_DIR}/registry/certs:/certs
ports:
- "${PRIVATE_REGISTRY_ADDR}:5443:443"
restart: always
networks:
- extnet