-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc.service.yaml
28 lines (26 loc) · 1.23 KB
/
dc.service.yaml
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
version: '3.7'
services:
app:
networks:
- launch-net
- default
deploy:
mode: replicated
replicas: 1
labels:
- 'traefik.enable=true'
- 'traefik.http.services.${SERVICE_NAME}-service.loadbalancer.server.port=3000'
- 'traefik.http.routers.${SERVICE_NAME}.entrypoints=web'
- 'traefik.http.routers.${SERVICE_NAME}.rule=Host(`lahacks.com`)'
- 'traefik.http.middlewares.${SERVICE_NAME}-redirect.redirectscheme.scheme=https'
- 'traefik.http.middlewares.${SERVICE_NAME}-redirect.redirectscheme.permanent=true'
- 'traefik.http.routers.${SERVICE_NAME}.middlewares=${SERVICE_NAME}-redirect@docker'
- 'traefik.http.routers.${SERVICE_NAME}-www.entrypoints=web'
- 'traefik.http.routers.${SERVICE_NAME}-www.rule=Host(`www.lahacks.com`)'
- 'traefik.http.routers.${SERVICE_NAME}-www.middlewares=${SERVICE_NAME}-redirect@docker'
- 'traefik.http.routers.${SERVICE_NAME}-secure.entrypoints=websecure'
- 'traefik.http.routers.${SERVICE_NAME}-secure.tls.certresolver=httpchallengeresolver'
- 'traefik.http.routers.${SERVICE_NAME}-secure.rule=Host(`lahacks.com`) || Host(`www.lahacks.com`)'
networks:
launch-net:
external: true