forked from hackclub/the-pier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-codespaces.yaml
150 lines (133 loc) · 5.36 KB
/
docker-compose-codespaces.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
reverse-proxy:
labels:
- traefik.enable=true
- traefik.http.middlewares.web-headers.headers.customresponseheaders.X-jer-test=hello_from_web_entrypoint
command:
- --entryPoints.web.address=0.0.0.0:80
- --entryPoints.grpc.address=:50051
- --api.insecure=true
- --providers.docker
- --providers.docker.exposedbydefault=false
- --entrypoints.web.http.middlewares=web-headers@docker
- --accesslog=true
- --accesslog.filepath=/var/log/traefik/access.log
- --accesslog.format=json
ports:
- "80:80"
- "50051:50051"
- "8080:8080"
play:
image: thecodingmachine/nodejs:v2-20-bullseye
command: npm run dev
working_dir: /usr/src/app/play
volumes:
- .:/usr/src/app
tmpfs: /tmp
environment:
PUSHER_URL: "https://${DOMAIN}/"
ICON_URL: "/icon"
FRONT_URL: "/front"
FRONT_BASE: "/front/"
NO_FRONT_HMR: "1"
PUBLIC_MAP_STORAGE_URL: "https://${DOMAIN}/map-storage"
UPLOADER_URL: "/uploader"
# ports:
# - "9702:3000"
# - "9706:3001"
# - "9711:8080"
labels:
- traefik.enable=true
- traefik.http.routers.play.rule=PathPrefix(`/`)
- traefik.http.routers.play.entrypoints=web
- traefik.http.routers.play.service=play
- traefik.http.services.play.loadbalancer.server.port=3000
- traefik.http.middlewares.play-headers.headers.customresponseheaders.X-jer-test2=hello_from_play
- traefik.http.routers.play.middlewares=play-headers@docker
- traefik.http.routers.front.rule=PathPrefix(`/front`)
- traefik.http.routers.front.entrypoints=web
- traefik.http.routers.front.service=front
- traefik.http.services.front.loadbalancer.server.port=8080
- traefik.http.middlewares.front-headers.headers.customresponseheaders.X-jer-test3=hello_from_front
- traefik.http.middlewares.strip-front-prefix.stripprefix.prefixes=/front
- traefik.http.routers.front.middlewares=strip-front-prefix@docker,front-headers@docker
- traefik.http.routers.play-ws.rule=PathPrefix(`/ws/`)
- traefik.http.routers.play-ws.entryPoints=web
- traefik.http.routers.play-ws.service=play-ws
- traefik.http.services.play-ws.loadbalancer.server.port=3001
- traefik.http.routers.room-api.rule=Host(`${DOMAIN}`)
- traefik.http.routers.room-api.entryPoints=grpc
- traefik.http.routers.room-api.service=room-api
- traefik.http.services.room-api.loadbalancer.server.port=50051
- traefik.http.services.room-api.loadbalancer.server.scheme=h2c
back:
image: thecodingmachine/nodejs:v2-20-bullseye
command: npm run dev
working_dir: /usr/src/app/back
volumes:
- .:/usr/src/app
environment:
PLAY_URL: "https://${DOMAIN}"
PUBLIC_MAP_STORAGE_URL: "https://${DOMAIN}/map-storage"
PUBLIC_MAP_PREFIX_REPLACE: "https://${DOMAIN}/map-storage"
labels:
- traefik.enable=true
- traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api
- traefik.http.routers.back.rule=PathPrefix(`/api`)
- traefik.http.routers.back.middlewares=strip-api-prefix@docker
- traefik.http.routers.back.entryPoints=web
- traefik.http.services.back.loadbalancer.server.port=8080
map-storage:
image: thecodingmachine/nodejs:v2-20-bullseye
command: npm run start:dev
working_dir: /usr/src/app/map-storage
volumes:
- .:/usr/src/app
- map-storage-data:/maps
environment:
PATH_PREFIX: "/map-storage"
PUSHER_URL: "https://${DOMAIN}/"
ENTITY_COLLECTION_URLS: "https://${DOMAIN}/collections/FurnitureCollection.json,https://${DOMAIN}/collections/OfficeCollection.json"
labels:
- traefik.enable=true
- traefik.http.middlewares.strip-map-storage-prefix.stripprefix.prefixes=/map-storage
- traefik.http.routers.map-storage.rule=PathPrefix(`/map-storage`)
- traefik.http.routers.map-storage.middlewares=strip-map-storage-prefix@docker
- traefik.http.routers.map-storage.entryPoints=web
- traefik.http.services.map-storage.loadbalancer.server.port=3000
uploader:
image: thecodingmachine/nodejs:v2-20-bullseye
command: npm run dev
working_dir: /usr/src/app/uploader
volumes:
- .:/usr/src/app
environment:
UPLOADER_URL: "https://${DOMAIN}/uploader"
labels:
- traefik.enable=true
- traefik.http.middlewares.strip-uploader-prefix.stripprefix.prefixes=/uploader
- traefik.http.routers.uploader.rule=PathPrefix(`/uploader`)
- traefik.http.routers.uploader.middlewares=strip-uploader-prefix@docker
- traefik.http.routers.uploader.entryPoints=web
- traefik.http.services.uploader.loadbalancer.server.port=8080
redis:
volumes:
- redisdata:/data
icon:
labels:
- traefik.enable=true
- traefik.http.middlewares.strip-icon-prefix.stripprefix.prefixes=/icon
- traefik.http.routers.icon.rule=PathPrefix(`/icon`)
- traefik.http.routers.icon.middlewares=strip-icon-prefix@docker
- traefik.http.routers.icon.entryPoints=web
- traefik.http.services.icon.loadbalancer.server.port=8080
whoami:
image: "traefik/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=PathPrefix(`/whoami`)"
- "traefik.http.routers.whoami.entrypoints=web"
volumes:
redisdata:
map-storage-data: