-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
27 lines (25 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
27 lines (25 loc) · 1.03 KB
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
version: "3"
services:
blog:
build: .
labels:
- "traefik.enable=true"
# メインドメイン用ルーター
- "traefik.http.routers.blog.rule=Host(`pisnp.net`)"
- "traefik.http.routers.blog.entrypoints=websecure"
- "traefik.http.routers.blog.tls=true"
- "traefik.http.routers.blog.tls.certresolver=myresolver"
- "traefik.http.services.blog.loadbalancer.server.port=3000"
# www → メインドメインにリダイレクト
- "traefik.http.routers.blog-www.rule=Host(`www.pisnp.net`)"
- "traefik.http.routers.blog-www.entrypoints=websecure"
- "traefik.http.routers.blog-www.tls=true"
- "traefik.http.routers.blog-www.tls.certresolver=myresolver"
- "traefik.http.routers.blog-www.middlewares=redirect-www"
- "traefik.http.middlewares.redirect-www.redirectregex.regex=^https://www\\.(.+)"
- "traefik.http.middlewares.redirect-www.redirectregex.replacement=https://$${1}"
networks:
- traefik-public
networks:
traefik-public:
external: true