-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (40 loc) · 1.27 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
version: '3'
services:
traefik:
image: "traefik:v2.9"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./certificates:/certificates"
- "./traefik.yml:/etc/traefik/traefik.yml"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`monitor.$DOMAIN`)"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certresolver=letsencrypt"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=oei:8d93c9b0486a80bc7b6909df5440d0c190eccd4e"
api:
build: ./server
container_name: "oei_api"
ports:
- "3000:3000"
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`api.$DOMAIN`)"
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.tls.certresolver=letsencrypt"
whoami:
# A container that exposes an API to show its IP address
image: "traefik/whoami"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.$DOMAIN`)"