-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
90 lines (83 loc) · 3.3 KB
/
docker-compose.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.9'
services:
traefik:
image: traefik:v3.0
container_name: traefik
ports:
- "80:80"
- "443:443"
- "30000:30000"
- "3000:3000"
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt:/letsencrypt
command:
- --api.dashboard=true
- --api.insecure=true
- --log.level=DEBUG
- --accesslog=true
- --providers.docker.network=proxy
- --providers.docker.exposedByDefault=false
- --entrypoints.web.address=:80
- --entrypoints.ws.address=:30000
- --entrypoints.configure.address=:3000
- --entrypoints.ws.http.tls.certresolver=myresolver
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- --entrypoints.websecure.asDefault=true
- --entrypoints.websecure.http.tls.certresolver=myresolver
- --certificatesresolvers.myresolver.acme.email=${EMAIL}
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
- --certificatesResolvers.myresolver.acme.caServer=https://acme-v02.api.letsencrypt.org/directory
labels:
- "traefik.enable=true"
- "traefik.http.routers.mydashboard.rule=Host(`${HOSTNAME}`) && (PathPrefix(`/dashboard/`) || PathPrefix(`/api`))"
- "traefik.http.routers.mydashboard.service=api@internal"
- "traefik.http.routers.mydashboard.middlewares=myauth"
- "traefik.http.middlewares.myauth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/"
webserver:
container_name: Webserver
build:
context: ./WebSocketClient
dockerfile: Dockerfile
restart: on-failure
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.webserver.rule=Host(`${HOSTNAME}`)"
- "traefik.http.services.webserver.loadbalancer.server.port=80"
- traefik.http.middlewares.mywwwredirect.redirectregex.regex=^https://www\.(.*)
- "traefik.http.middlewares.mywwwredirect.redirectregex.replacement=https://$${1}"
- "traefik.http.routers.webserver.middlewares=mywwwredirect"
languageserver:
container_name: LanguageServer
build:
context: ./WebSocketLanguageServer
dockerfile: Dockerfile
hostname: language-server
restart: on-failure
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.languageserver.entrypoints=ws"
- "traefik.http.routers.languageserver.rule=Host(`${HOSTNAME}`) && Path(`/`)"
- "traefik.http.services.languageserver.loadbalancer.server.port=30000"
- "traefik.http.routers.languageserver.tls.certresolver=myresolver"
- "traefik.http.routers.languageserver.service=languageserver"
- "traefik.http.routers.configureview.entrypoints=configure"
- "traefik.http.routers.configureview.rule=Host(`${HOSTNAME}`)"
- "traefik.http.routers.configureview.service=configureview"
- "traefik.http.services.configureview.loadbalancer.server.port=3000"
- "traefik.http.routers.configureview.tls.certresolver=myresolver"
networks:
proxy:
name: proxy
volumes:
letsencrypt:
name: letsencrypt