-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 1.2 KB
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 1.2 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
# WARNING: Do not use depends_on between services that have persistent volumes.
# Rebuilding a dependency (e.g. spacetimedb) will recreate its volume and WIPE ALL DATA.
# Also: every `publish` invalidates ALL existing JWT tokens.
services:
spacetimedb:
image: clockworklabs/spacetime:latest
command: start
ports:
- "3000:3000"
volumes:
- stdb-data:/home/spacetime/.local/share/spacetime
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/v1/ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
web:
image: node:22-slim
working_dir: /app
ports:
- "4321:4321"
volumes:
- ./web:/app
- web-node-modules:/app/node_modules
command: sh -c "npm install && npx astro dev --host 0.0.0.0"
restart: unless-stopped
worker:
build: ./worker
ports:
- "8080:8080"
environment:
- STDB_URL=http://spacetimedb:3000
- STDB_DB=app
- UPLOAD_DIR=/uploads
- PORT=8080
- SYNC_INTERVAL_SECS=30
- RUST_LOG=worker=info
volumes:
- uploads:/uploads
restart: unless-stopped
volumes:
stdb-data:
web-node-modules:
uploads: