-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (78 loc) · 2.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
82 lines (78 loc) · 2.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
# Commons Local Development Stack
#
# Usage:
# docker compose up -d - Start all services in background
# docker compose down - Stop all services
# docker compose down -v - Stop and remove volumes (full reset)
#
# First run — generate the Convex admin key:
# docker compose up -d convex-backend
# docker compose exec convex-backend ./generate_admin_key.sh
# # Copy the output into .env.local as CONVEX_SELF_HOSTED_ADMIN_KEY
#
# Then start the dev servers:
# npx convex dev - Push schema + functions to local backend
# npm run dev - Start SvelteKit dev server
#
# Dashboard: http://localhost:6791
services:
convex-backend:
image: ghcr.io/get-convex/convex-backend:latest
container_name: commons-convex-backend
stop_grace_period: 10s
stop_signal: SIGINT
ports:
# Loopback only — the backend runs with DO_NOT_REQUIRE_SSL and no auth, so a
# 0.0.0.0 publish would expose an unauthenticated Convex API to the whole LAN.
- "127.0.0.1:3210:3210" # Convex API
- "127.0.0.1:3211:3211" # HTTP actions (site proxy)
volumes:
- convex-data:/convex/data
environment:
- DO_NOT_REQUIRE_SSL=true
- RUST_LOG=info
- DOCUMENT_RETENTION_DELAY=172800
- DISABLE_METRICS_ENDPOINT=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3210/version"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
convex-dashboard:
image: ghcr.io/get-convex/convex-dashboard:latest
container_name: commons-convex-dashboard
stop_grace_period: 10s
stop_signal: SIGINT
ports:
# Loopback only — the admin dashboard must not be reachable from the LAN.
- "127.0.0.1:6791:6791"
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=http://127.0.0.1:3210
depends_on:
convex-backend:
condition: service_healthy
restart: unless-stopped
ipfs:
image: ipfs/kubo:latest
container_name: commons-ipfs
ports:
- "5001:5001" # API
- "8080:8080" # Gateway
environment:
IPFS_PROFILE: server
volumes:
- ipfs-data:/data/ipfs
healthcheck:
test: ["CMD-SHELL", "ipfs id || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
restart: unless-stopped
volumes:
convex-data:
driver: local
ipfs-data:
driver: local