Repository navigation
Expand file tree
/
Copy pathdocker-compose.coolify.yml
More file actions
112 lines (108 loc) · 3.38 KB
/
Copy pathdocker-compose.coolify.yml
File metadata and controls
112 lines (108 loc) · 3.38 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
# Coolify deployment for quickchat.
#
# Setup: create an Application from the Git repository (GitHub App or
# deploy key) with Build Pack "Docker Compose", Base Directory "/",
# Docker Compose Location "/docker-compose.coolify.yml". Do not paste
# this file into "Docker Compose Empty": that resource has no checkout,
# so the Dockerfile build context would be an empty directory.
# Set the service's Domains field to the public URL including the
# internal port, for example https://chat.example.com:8080.
#
# Coolify injects its management and proxy labels itself, so none are
# defined here. The quickchat image is built on the server from the
# repository Dockerfile (context is the repo root, relative to this
# file), so no registry is needed. The first build runs the web build
# and the go build inside the container. Rolling updates do not apply
# to compose resources, so expect a short restart on each deploy.
#
# Required environment variables in Coolify:
# LIVEKIT_API_KEY, LIVEKIT_API_SECRET
# Optional: QUICKCHAT_ROOM_TTL, QUICKCHAT_MAX_FILE,
# QUICKCHAT_ICE_SERVERS (comma separated stun or turn urls),
# LIVEKIT_NODE_IP (pin the advertised media ip), TZ
#
# LiveKit is bundled and needs no domain of its own: the app proxies
# its signaling under /rtc on the quickchat domain. Open 7881/tcp and
# 7882/udp on the host firewall for WebRTC media.
name: quickchat
x-logging: &default-logging
driver: json-file
options:
max-size: "50m"
max-file: "3"
services:
quickchat:
build:
context: .
dockerfile: Dockerfile
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_TRUSTED_PROXY=true
- LIVEKIT_INTERNAL_URL=http://livekit:7880
- LIVEKIT_API_KEY=${LIVEKIT_API_KEY:?}
- LIVEKIT_API_SECRET=${LIVEKIT_API_SECRET:?}
- SERVICE_FQDN_QUICKCHAT_8080
- TZ=${TZ:-UTC}
expose:
- "8080"
volumes:
- quickchat-data:/data
tmpfs:
- /tmp:size=64m,mode=1777
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
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
livekit:
image: livekit/livekit-server:v1.13.10@sha256:89ca9ce0791e18d6e03bf6e2c49ceb27e1c754eae8bd50c989386c1a5963791a
user: "65532:65532"
environment:
LIVEKIT_KEYS: "${LIVEKIT_API_KEY:?}: ${LIVEKIT_API_SECRET:?}"
LIVEKIT_USE_EXTERNAL_IP: "${LIVEKIT_USE_EXTERNAL_IP:-true}"
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"
expose:
- "7880"
tmpfs:
- /tmp:size=64m,mode=1777
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
cpus: "2.0"
memory: 512M
logging: *default-logging
volumes:
quickchat-data: