-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.docker-compose.yml
29 lines (27 loc) · 1.07 KB
/
proxy.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
version: "3.8"
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.10
# Enables the web UI and tells Traefik to listen to docker
command: --configFile=/etc/traefik/traefik.yml --providers.file.directory=/etc/traefik/dynamic.conf
ports:
# The HTTP port
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- ./proxy:/etc/traefik
labels:
- "traefik.http.routers.dashboard.rule=Host(`traefik.docker.localhost`, `traefik.kchusap.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$/7fbNsNF$b9LFWJHm04.riZF007OLO."
whoami:
# A container that exposes an API to show its IP address
image: traefik/whoami
profiles:
- debug
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"