-
Notifications
You must be signed in to change notification settings - Fork 0
/
Docker_Nginx_Nginx-Proxy.yml
51 lines (44 loc) · 1.3 KB
/
Docker_Nginx_Nginx-Proxy.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
version: '2'
# make sure you search for and replace the below settings
# /path/to/certs - search for the path to the certifications and replace with the correct path
# /path/to/nginx.tmpl - search for the path to nginx.tmpl and replace with the correct path
services:
#Nginx server
nginx:
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- /etc/nginx/conf.d
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /tmp/certs:/etc/nginx/certs:ro
#nginx-gen
#repository https://github.com/jwilder/docker-gen
nginx-gen:
image: jwilder/docker-gen
container_name: nginx-gen
volumes_from:
- nginx
volumes:
- /tmp/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
#nginx-proxy
#repository https://github.com/jwilder/nginx-proxy
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
volumes_from:
- nginx-gen
hello-world:
image: tutum/hello-world
container_name: hello-world
ports:
- "85:80"
environment:
- VIRTUAL_HOST=shipyd.uorder.us