File tree Expand file tree Collapse file tree 1 file changed +6
-47
lines changed Expand file tree Collapse file tree 1 file changed +6
-47
lines changed Original file line number Diff line number Diff line change 1
- version: '2'
2
- services:
3
- consul:
4
- image: shcoder/consul
5
- container_name: consul
6
- restart: always
7
- ports:
8
- - 8400:8400
9
- - 8500:8500
10
- - 53:53/udp
11
- entrypoint:
12
- - /bin/start
13
- - -bootstrap
14
- - -server
15
- - -client 0.0.0.0
16
-
17
- registrator:
18
- image: gliderlabs/registrator
19
- container_name: registrator
20
- restart: always
21
- volumes:
22
- - /var/run/docker.sock:/tmp/docker.sock
23
- entrypoint:
24
- - /bin/registrator
25
- - -internal
26
- - consul://consul:8500
27
- links:
28
- - consul
29
-
30
- proxy:
31
- image: shcoder/nginx-proxy-consul-template
32
- container_name: nginx_proxy
33
- ports:
34
- - 80:80
35
- volumes:
36
- - ${PWD}/templates:/templates
37
- links:
38
- - consul
39
- - registrator
40
- environment:
41
- - CONSUL_URL=consul:8500
42
- - SERVICE_80_NAME=nginx_proxy
43
-
44
- networks:
45
- default:
46
- external:
47
- name: app
1
+ CONSUL:
2
+ docker run -d --name consul --net=app --restart always -p 8400:8400 -p 8500:8500 -p 53:53/udp -h node1 --net app consul -bootstrap -server -client 0.0.0.0 -ui-dir /ui
3
+ REGISTRATOR:
4
+ docker run -d --net host --name=registrator --restart always --volume=/var/run/docker.sock:/tmp/docker.sock gliderlabs/registrator: latest -internal consul://localhost:8500
5
+ NGINX-PROXY
6
+ docker run --restart always -p 80:80 -d --name nginx_proxy --net=app nginx_proxy
You can’t perform that action at this time.
0 commit comments