-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 986 Bytes
/
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
#
# Reverse proxy using https://github.com/jwilder/nginx-proxy
#
# Proxies docker containers specified using VIRTUAL_HOST=foo.bar.com to port 80
#
# See also https://blog.ssdnodes.com/blog/tutorial-using-docker-and-nginx-to-host-multiple-websites/
#
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
restart: always
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
dnsmasq:
build: ./
image: rkent/dnsmasq:proxy
container_name: dnsmasq-proxy
restart: always
ports:
- "53:53/tcp"
- "53:53/udp"
env_file: .env
command: ["-A", "/${DOMAIN}/${IP_ADDR}"]
environment:
- IP_ADDR=$IP_ADDR
cap_add:
- NET_ADMIN
networks:
default:
external:
name: nginx-proxy
# Following is the demo suggested as a test at jwilder/nginx-proxy
# whoami:
# image: jwilder/whoami
# environment:
# - VIRTUAL_HOST=whoami.local