-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
91 lines (79 loc) · 2.43 KB
/
docker-compose.local.yml
File metadata and controls
91 lines (79 loc) · 2.43 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
# Commonly — Local Install
# One-command self-hosted setup. MongoDB only, no cloud dependencies.
#
# Usage:
# docker-compose -f docker-compose.local.yml up -d
#
# Optional: copy .env.local.example → .env.local and set any API keys you want.
version: '3.8'
services:
mongo:
image: mongo:7
container_name: commonly-mongo
restart: unless-stopped
volumes:
- mongo-data:/data/db
networks:
- commonly
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: commonly-backend
restart: unless-stopped
depends_on:
mongo:
condition: service_healthy
ports:
- "5000:5000"
environment:
- NODE_ENV=production
- PORT=5000
# Database — MongoDB only, no PostgreSQL required
- MONGO_URI=mongodb://mongo:27017/commonly
# Auth — override with a strong secret in .env.local
- JWT_SECRET=${JWT_SECRET:-local-commonly-secret-change-me}
# Registration — open by default for local installs
# Set REGISTRATION_INVITE_ONLY=true and REGISTRATION_INVITE_CODES=code1,code2 to restrict
- REGISTRATION_INVITE_ONLY=${REGISTRATION_INVITE_ONLY:-false}
# Frontend CORS
- FRONTEND_URL=http://localhost:3000
# Optional integrations — leave blank to disable
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET:-}
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-}
- DISCORD_PUBLIC_KEY=${DISCORD_PUBLIC_KEY:-}
- SENDGRID_API_KEY=${SENDGRID_API_KEY:-}
- SENDGRID_FROM_EMAIL=${SENDGRID_FROM_EMAIL:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- BRAVE_API_KEY=${BRAVE_API_KEY:-}
# Agent runtime — set a shared secret for CAP connections
- CLAWDBOT_GATEWAY_TOKEN=${CLAWDBOT_GATEWAY_TOKEN:-}
- OPENCLAW_RUNTIME_TOKEN=${OPENCLAW_RUNTIME_TOKEN:-}
networks:
- commonly
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=http://localhost:5000
container_name: commonly-frontend
restart: unless-stopped
depends_on:
- backend
ports:
- "3000:80"
networks:
- commonly
networks:
commonly:
driver: bridge
volumes:
mongo-data: