Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
158 lines (152 loc) · 4.42 KB
/
Copy pathdocker-compose.yml
File metadata and controls
158 lines (152 loc) · 4.42 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
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
151
152
153
154
155
156
157
158
name: quickchat
x-logging: &default-logging
driver: json-file
options:
max-size: "50m"
max-file: "3"
services:
quickchat:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${QUICKCHAT_VERSION:-dev}
REVISION: ${QUICKCHAT_REVISION:-unknown}
image: quickchat:latest
restart: unless-stopped
user: "65532:65532"
environment:
- QUICKCHAT_ADDR=:8080
- QUICKCHAT_DATA=/data
- QUICKCHAT_ROOM_TTL=${QUICKCHAT_ROOM_TTL:-168h}
- QUICKCHAT_MAX_FILE=${QUICKCHAT_MAX_FILE:-67108864}
- QUICKCHAT_ICE_SERVERS=${QUICKCHAT_ICE_SERVERS:-}
- QUICKCHAT_PPROF=${QUICKCHAT_PPROF:-}
- QUICKCHAT_TRUSTED_PROXY=true
- LIVEKIT_INTERNAL_URL=http://livekit:7880
- LIVEKIT_API_KEY=${LIVEKIT_API_KEY:?}
- LIVEKIT_API_SECRET=${LIVEKIT_API_SECRET:?}
- TZ=${TZ:-UTC}
volumes:
- quickchat-data:/data
tmpfs:
- /tmp:size=64m,mode=1777
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
expose:
- "8080"
networks:
- web
labels:
- traefik.enable=true
- traefik.docker.network=quickchat-web
- traefik.http.routers.quickchat.rule=Host(`${QUICKCHAT_DOMAIN:?}`)
- traefik.http.routers.quickchat.entrypoints=websecure
- traefik.http.routers.quickchat.tls.certresolver=le
- traefik.http.services.quickchat.loadbalancer.server.port=8080
healthcheck:
test: ["CMD", "/quickchat", "healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: "1.0"
memory: 256M
logging: *default-logging
# bundled livekit server so the stack is all in one. the app proxies
# its signaling under /rtc on the main domain; media rides dedicated
# ports. on a vps, open 7881/tcp and 7882/udp in the firewall.
livekit:
image: livekit/livekit-server:v1.13.10@sha256:89ca9ce0791e18d6e03bf6e2c49ceb27e1c754eae8bd50c989386c1a5963791a
restart: unless-stopped
user: "65532:65532"
environment:
LIVEKIT_KEYS: "${LIVEKIT_API_KEY:?}: ${LIVEKIT_API_SECRET:?}"
# advertise the public ip via stun by default. To pin it, set
# LIVEKIT_USE_EXTERNAL_IP=false and LIVEKIT_NODE_IP=<ip>.
NODE_IP: "${LIVEKIT_NODE_IP:-}"
LIVEKIT_CONFIG: |
port: 7880
rtc:
tcp_port: 7881
udp_port: 7882
use_external_ip: ${LIVEKIT_USE_EXTERNAL_IP:-true}
TZ: ${TZ:-UTC}
HOME: /tmp
ports:
- "7881:7881"
- "7882:7882/udp"
tmpfs:
- /tmp:size=64m,mode=1777
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
expose:
- "7880"
networks:
- web
deploy:
resources:
limits:
cpus: "2.0"
memory: 512M
logging: *default-logging
traefik:
image: docker.io/library/traefik:v3.7.15@sha256:0f6150202bc1fed72a7bd2107460eaa510e5b8a905f3fdb5b84f2c8619c33368
restart: unless-stopped
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=quickchat-web
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- --certificatesresolvers.le.acme.tlschallenge=true
- --certificatesresolvers.le.acme.email=${ACME_EMAIL:?}
- --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
# traefik only needs read access to the docker API. For a stricter
# setup, front the socket with wollomatic/socket-proxy and point
# providers.docker.endpoint at it instead.
- /var/run/docker.sock:/var/run/docker.sock:ro
- traefik-certs:/letsencrypt
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:size=32m,mode=1777
networks:
- web
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: "0.5"
memory: 128M
logging: *default-logging
networks:
web:
driver: bridge
volumes:
quickchat-data:
traefik-certs: