-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (46 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
49 lines (46 loc) · 1.11 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
# 信令服务器
signaling:
build:
context: .
dockerfile: apps/signaling/Dockerfile
container_name: meshkit-signaling
ports:
- "7000:7000" # WebSocket 端口
- "8000:8000" # PeerJS 端口
environment:
- NODE_ENV=production
- WS_PORT=7000
- PEER_PORT=8000
restart: unless-stopped
networks:
- meshkit-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Web 应用
web:
build:
context: .
dockerfile: packages/web/Dockerfile
container_name: meshkit-web
ports:
- "3000:80" # 将容器的 80 端口映射到主机的 3000 端口
depends_on:
- signaling
restart: unless-stopped
networks:
- meshkit-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
meshkit-network:
driver: bridge