forked from tkgshn/cartographer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess-compose.yml
More file actions
53 lines (49 loc) · 1.57 KB
/
process-compose.yml
File metadata and controls
53 lines (49 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
version: "0.5"
processes:
supabase:
command: |
if [ ! -f infra/supabase/bundle/.env ]; then
if [ -f infra/supabase/bundle/.env.example ]; then
cp infra/supabase/bundle/.env.example infra/supabase/bundle/.env
fi
echo "[supabase] .env が無いので infra/supabase/bundle/.env を用意しました。"
fi
# Create override file to expose PostgreSQL port
cat > infra/supabase/bundle/docker-compose.override.yml << 'EOF'
services:
db:
ports:
- "54322:5432"
EOF
cd infra/supabase/bundle && docker compose up db rest auth kong storage meta
readiness_probe:
exec:
command: "docker exec supabase-db pg_isready -U postgres"
initial_delay_seconds: 5
period_seconds: 2
failure_threshold: 30
availability:
restart: "on_failure"
supabase-migrate:
command: |
cat supabase/migrations/*.sql | docker exec -i supabase-db psql -U postgres -d postgres
echo "Migrations applied successfully"
depends_on:
supabase:
condition: process_healthy
availability:
restart: "no"
backend:
command: "DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:54322/postgres nix run .#cartographer-backend"
availability:
restart: "on_failure"
depends_on:
supabase-migrate:
condition: process_completed_successfully
frontend:
command: "npm run dev"
availability:
restart: "on_failure"
depends_on:
backend:
condition: process_started