Files
social-app/infra/README.md
T

2.7 KiB

Infra

Local Docker environment for Supabase stack and supporting services.

Quick Start

  1. Copy environment file:

    cp infra/env/.env.example infra/env/.env.local
    
  2. Update infra/env/.env.local with your secrets and configurations.
    Important: Ensure all required fields are filled (no CHANGE_ME values).

  3. Start services:

    docker compose --env-file infra/env/.env.local -f infra/local/docker-compose.yml up -d
    

Access

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, and SUPABASE_PUBLIC_URL in .env.local

Environment Variables Not Applied

If Docker reports warnings about missing variables, verify:

  • The --env-file path 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.local to version control
  • Always use --env-file when running docker compose
  • Port conflicts on Windows (especially 8000) can prevent Kong from starting
  • Kong configuration is auto-generated from templates on container start