forked from cristiangirlea/devproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (96 loc) · 2.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (96 loc) · 2.58 KB
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
version: "3.8"
networks:
devproxy2:
external: true
volumes:
stepca-data:
traefik-certs:
services:
dnsserve:
restart: unless-stopped
build: ./docker/dnsserve
init: true
networks:
devproxy2:
traefik:
build: ./docker/traefik
restart: unless-stopped
volumes:
- stepca-data:/stepca-data:ro
- traefik-certs:/traefik-certs
networks:
devproxy2:
default:
depends_on:
- dockerproxy
- dnsmasq
- dnsserve
- step-ca
labels:
- "traefik.enable=true"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
- "traefik.http.routers.traefik.rule=Host(`traefik.devproxy.test`)"
step-ca:
build: ./docker/stepca
restart: unless-stopped
depends_on:
- dnsserve
volumes:
- "stepca-data:/home/step"
- "./ca-config:/home/step/config:ro"
networks:
devproxy2:
bootstrap:
build: ./docker/stepca
depends_on:
- dnsserve
volumes:
- "stepca-data:/home/step"
- "./ca-config:/home/step/config:ro"
entrypoint: ["/bootstrap.sh"]
networks:
devproxy2:
dockerproxy:
restart: unless-stopped
image: tecnativa/docker-socket-proxy
networks:
- default
# Set this to true if you get errors due to SELinux/AppArmor
privileged: false
environment:
CONTAINERS: 1
LOG_LEVEL: warning
volumes:
- /var/run/docker.sock:/var/run/docker.sock
whoami:
image: containous/whoami:latest
hostname: "whoami1"
networks:
devproxy2:
labels:
traefik.enable: "true"
# Use devDomain as a simple shorthand, the line below will create the rule Host(`whoami.devproxy.test`)
devDomain: whoami.devproxy
# Use any traefik config to create custom rules instead
# traefik.http.routers.whoami.rule: Host(`whoami.devproxy.test`)
whoami-wildcard:
image: containous/whoami:latest
hostname: "whoami1"
networks:
devproxy2:
labels:
#this is a wildcard domain example
traefik.enable: "true"
traefik.http.routers.whoami-wildcard.rule: HostRegexp(`{.*}.whoami.devproxy.test`, `whoami.devproxy.test`)
traefik.http.routers.whoami-wildcard.tls.certresolver: "stepca"
traefik.http.routers.whoami-wildcard.tls.domains[0].main: "whoami.devproxy.test"
traefik.http.routers.whoami-wildcard.tls.domains[0].sans: "*.whoami.devproxy.test"
dnsmasq:
build: ./docker/dnsmasq
restart: unless-stopped
networks:
devproxy2:
ports:
#expose on port 5300 in ca
- "127.0.0.1:53535:53"
- "127.0.0.1:53535:53/udp"