-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 985 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (34 loc) · 985 Bytes
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
services:
traefik:
image: traefik:v3.5.2
restart: unless-stopped
networks:
- traefik
environment:
- HTPASSWD=${HTPASSWD}
- DOMAIN=${DOMAIN}
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./letsencrypt:/letsencrypt
- ./config.toml:/etc/traefik/config.toml:ro
- ./config-template.toml:/etc/traefik/config-template.toml:ro
command: >
--configFile=/etc/traefik/config.toml
hello:
image: crccheck/hello-world
restart: unless-stopped
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.services.hello.loadbalancer.server.port=8000
- traefik.http.routers.hello.rule=Host(`hello.${DOMAIN}`) || Host(`hello.localhost`)
- traefik.http.routers.hello.tls=true
- traefik.http.routers.hello.entrypoints=https
- traefik.http.routers.hello.tls.certResolver=tls
networks:
traefik:
external: true