-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
73 lines (67 loc) · 1.97 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
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
version: "3.8"
services:
traefik:
image: traefik:v2.5
command: |
--providers.docker
--providers.docker.exposedByDefault=false
--log.level=INFO
--accesslog=true
--entryPoints.web.address=:80
--api.insecure=true
--api.dashboard=true
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
traefik.enable: "true"
traefik.http.routers.api.rule: "Host(`traefik.localhost.com`)"
traefik.http.routers.api.service: "api@internal"
whoami:
image: traefik/whoami
labels:
traefik.enable: "true"
traefik.http.routers.whoami.rule: "Host(`whoami.localhost.com`)"
traefik.http.routers.whoami.middlewares: "access-guard@docker"
access-guard:
image: access-guard
build:
context: .
target: dev
args:
- BASE_IMAGE=access-guard:base
command: [
".*@test\\.com$$",
"--secret", "supersecret",
"--auth-host", "http://access-guard.localhost.com/",
"--trusted-hosts", "access-guard", "access-guard.localhost.com",
"--cookie-domain", "localhost.com",
"--email-host", "mailhog",
"--email-port", "1025",
"--from-email", "[email protected]",
"--log-formatter", "console",
]
stdin_open: true
tty: true
depends_on:
- mailhog
ports:
- "8585:8585"
volumes:
- ./access_guard:/app/access_guard:cached
- ./setup.cfg:/app/setup.cfg
- ./pyproject.toml:/app/pyproject.toml
- mypy_cache:/app/.mypy_cache
labels:
traefik.enable: "true"
traefik.http.routers.access-guard.rule: "Host(`access-guard.localhost.com`)"
traefik.http.routers.access-guard.service: "access-guard"
traefik.http.middlewares.access-guard.forwardauth.address: "http://access-guard:8585/auth"
traefik.http.services.access-guard.loadbalancer.server.port: "8585"
mailhog:
image: mailhog/mailhog
ports:
- 8025:8025
volumes:
mypy_cache: