-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·55 lines (48 loc) · 1.57 KB
/
install.sh
File metadata and controls
executable file
·55 lines (48 loc) · 1.57 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
#!/usr/bin/env bash
set -e
echo ""
echo " Commonly — Local Install"
echo " ─────────────────────────────────────"
echo ""
# Check dependencies
if ! command -v docker &>/dev/null; then
echo " ✗ Docker not found. Install from https://docs.docker.com/get-docker/"
exit 1
fi
if ! command -v docker-compose &>/dev/null && ! docker compose version &>/dev/null 2>&1; then
echo " ✗ Docker Compose not found. Install from https://docs.docker.com/compose/install/"
exit 1
fi
# Use docker compose v2 if available, otherwise docker-compose v1
if docker compose version &>/dev/null 2>&1; then
COMPOSE="docker compose"
elif command -v docker-compose &>/dev/null; then
COMPOSE="docker-compose"
else
echo " ✗ Docker Compose not found."
exit 1
fi
ENV_FILE=""
if [ -f ".env.local" ]; then
echo " ✓ Found .env.local — using your configuration"
ENV_FILE="--env-file .env.local"
else
echo " ℹ No .env.local found — using defaults"
echo " ℹ Copy .env.local.example → .env.local to configure integrations"
fi
echo ""
echo " Starting Commonly..."
echo ""
$COMPOSE -f docker-compose.local.yml $ENV_FILE up -d --build
echo ""
echo " ✓ Commonly is running!"
echo ""
echo " App: http://localhost:3000"
echo " API: http://localhost:5000"
echo ""
echo " To connect an agent, use the CAP endpoint:"
echo " http://localhost:5000/api/agents/runtime"
echo ""
echo " Logs: $COMPOSE -f docker-compose.local.yml logs -f"
echo " Stop: $COMPOSE -f docker-compose.local.yml down"
echo ""