-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·69 lines (61 loc) · 2.66 KB
/
Copy pathdev.sh
File metadata and controls
executable file
·69 lines (61 loc) · 2.66 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
#!/bin/bash
# Catalyst - Quick Start
# Sets up and runs Catalyst via Docker Compose
set -e
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ Catalyst — Docker Compose Setup ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
# Check for docker compose
if command -v docker >/dev/null 2>&1; then
DOCKER_COMPOSE="docker compose"
elif command -v podman >/dev/null 2>&1; then
DOCKER_COMPOSE="podman compose"
else
echo "Error: docker or podman is required."
echo " Install Docker: https://docs.docker.com/get-docker/"
echo " Or Podman: https://podman.io/getting-started"
exit 1
fi
# Create .env from example if it doesn't exist
if [ ! -f .env ]; then
cp .env.example .env
echo "Created .env from .env.example"
echo ""
echo "⚠ Edit .env and set at minimum:"
echo " BETTER_AUTH_SECRET (openssl rand -base64 32)"
echo " POSTGRES_PASSWORD"
echo ""
read -rp "Press Enter to continue once you've edited .env, or Ctrl+C to abort..."
fi
# Validate required vars
source .env 2>/dev/null || true
if [ -z "$BETTER_AUTH_SECRET" ] || [ "$BETTER_AUTH_SECRET" = "your-super-secret-better-auth-key" ]; then
echo "Error: BETTER_AUTH_SECRET is not set in .env"
echo " Generate one: openssl rand -base64 32"
exit 1
fi
if [ -z "$POSTGRES_PASSWORD" ]; then
echo "Error: POSTGRES_PASSWORD is not set in .env"
exit 1
fi
echo "Starting Catalyst..."
echo ""
# Build and start all services
$DOCKER_COMPOSE up -d --build
echo ""
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ Catalyst is running! ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
echo " Panel: http://localhost${FRONTEND_PORT:+:$FRONTEND_PORT}"
echo " API: http://localhost:3000/api"
echo " Docs: http://localhost:3000/docs"
echo ""
echo " First-time setup: seed the database with"
echo " docker compose exec backend pnpm run db:seed"
echo ""
echo " View logs: docker compose logs -f"
echo " Stop: docker compose down"
echo " Reset: docker compose down -v"
echo ""