2.7 KiB
2.7 KiB
Infra
Local Docker environment for Supabase stack and supporting services.
Quick Start
-
Copy environment file:
cp infra/env/.env.example infra/env/.env.local -
Update
infra/env/.env.localwith your secrets and configurations.
Important: Ensure all required fields are filled (noCHANGE_MEvalues). -
Start services:
docker compose --env-file infra/env/.env.local -f infra/local/docker-compose.yml up -d
Access
- Supabase Studio: http://localhost:8001
Credentials fromDASHBOARD_USERNAMEandDASHBOARD_PASSWORDin.env.local - Qdrant: http://localhost:6333
- Redis: localhost:6379
Troubleshooting
Port Conflicts
If localhost:8001 is unreachable, check for port conflicts:
Linux/WSL:
ss -ltnp 'sport = :8001'
Windows:
Get-NetTCPConnection -LocalPort 8001 | Select-Object LocalAddress, LocalPort, State, OwningProcess
Get-Process -Id (Get-NetTCPConnection -LocalPort 8001).OwningProcess
If a Windows service occupies the port, either:
- Stop the conflicting service
- Change
KONG_HTTP_PORT,API_EXTERNAL_URL, andSUPABASE_PUBLIC_URLin.env.local
Environment Variables Not Applied
If Docker reports warnings about missing variables, verify:
- The
--env-filepath is correct - All required variables are set in
.env.local(no empty values)
Service Health
Check service status:
docker compose --env-file infra/env/.env.local -f infra/local/docker-compose.yml ps
View logs:
docker compose --env-file infra/env/.env.local -f infra/local/docker-compose.yml logs <service-name>
Services
| Service | Description |
|---|---|
| kong | API gateway (8001/8443) |
| studio | Supabase UI (via Kong) |
| auth | Authentication (GoTrue) |
| db | PostgreSQL database |
| rest | PostgREST API |
| realtime | Realtime subscriptions |
| storage | Storage API |
| functions | Edge functions |
| analytics | Logflare logging |
| vector | Log aggregator |
| supavisor | Database connection pooler |
| qdrant | Vector database |
| redis | Cache/message broker |
Important Notes
- Never commit
.env.localto version control - Always use
--env-filewhen running docker compose - Port conflicts on Windows (especially 8000) can prevent Kong from starting
- Kong configuration is auto-generated from templates on container start