-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (35 loc) · 1.19 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
version: '3.9'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.7
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker"
- "--ping"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
cheers:
# The cheers service
build: ./cool
labels:
- traefik.http.middlewares.test-auth.forwardauth.address=http://auth:8080/auth
- traefik.http.middlewares.test-auth.forwardauth.authResponseHeadersRegex=^X-Auth-
- traefik.http.routers.cheers.rule=Host(`cheers.docker.localhost`)
- traefik.http.routers.cheers.middlewares=test-auth
environment:
- SECRET_KEY=fe297ec180ce2937ca21f3dd026b58bdd3294038c7ac54fb7d2673d11510dcad
auth:
# The authentication service
build: ./auth
labels:
- traefik.http.routers.auth.rule=Host(`auth.docker.localhost`)
environment:
- SECRET_KEY=fe297ec180ce2937ca21f3dd026b58bdd3294038c7ac54fb7d2673d11510dcad