-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (34 loc) Β· 1.14 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
version: "3.7"
services:
traefik:
build: traefik.docker
image: traefik:local
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/etc/traefik/traefik.toml
- ./traefik_dynamic_conf.toml:/etc/traefik/traefik_dynamic_conf.toml
- ./certs:/certs
ports:
- "${TRAEFIK_PORT_HTTP:-80}:80"
- "${TRAEFIK_PORT_HTTPS:-443}:443"
- "${TRAEFIK_PORT_DASHBOARD:-8080}:8080"
- "${TRAEFIK_PORT_SSH:-8022}:22"
container_name: traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`traefik.test`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.entrypoints=web,web-secure"
- "traefik.http.routers.api.middlewares=redirect-to-https@file"
whoami:
image: containous/whoami:latest
container_name: whoami
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.entrypoints=web,web-secure"
- "traefik.http.routers.whoami.rule=Host(`whoami.test`)"
- "traefik.http.routers.whoami.middlewares=redirect-to-https@file"
networks:
default:
external:
name: traefik