Merge remote-tracking branch 'old-github/main' into integrate-old-refactors-of-github
This commit is contained in:
@@ -5,6 +5,7 @@ The Supabase containers are now integrated into the main `docker-compose.yml` fi
|
||||
## What Changed
|
||||
|
||||
All Supabase services are now defined in the root `docker-compose.yml`:
|
||||
|
||||
- **supabase-db**: PostgreSQL database (port 54322)
|
||||
- **supabase-rest**: PostgREST API (port 54321)
|
||||
- **supabase-auth**: GoTrue authentication service (port 9999)
|
||||
@@ -48,27 +49,34 @@ VITE_SUPABASE_ANON_KEY=<your-anon-key>
|
||||
```
|
||||
|
||||
The default anon key for local development is:
|
||||
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
[REDACTED]
|
||||
=======
|
||||
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
|
||||
>>>>>>> old-github/main
|
||||
```
|
||||
|
||||
### Migrations
|
||||
|
||||
Migrations are automatically run on first startup via the `supabase-migrate` service. The service:
|
||||
|
||||
1. Waits for the database to be ready
|
||||
2. Runs all migrations from `supabase/migrations/` in alphabetical order
|
||||
3. Runs seed files (`seed_01_users.sql` and `seed_02_phase2_experiments.sql`)
|
||||
|
||||
If you need to re-run migrations, you can:
|
||||
|
||||
1. Stop the containers: `docker compose down`
|
||||
2. Remove the database volume: `docker volume rm usda-vision_supabase-db`
|
||||
3. Start again: `docker compose up -d`
|
||||
|
||||
### Accessing Services
|
||||
|
||||
- **Supabase API**: http://localhost:54321
|
||||
- **Supabase Studio**: http://localhost:54323
|
||||
- **Email Testing (Inbucket)**: http://localhost:54324
|
||||
- **Supabase API**: <http://localhost:54321>
|
||||
- **Supabase Studio**: <http://localhost:54323>
|
||||
- **Email Testing (Inbucket)**: <http://localhost:54324>
|
||||
- **Database (direct)**: localhost:54322
|
||||
|
||||
### Network
|
||||
@@ -88,12 +96,14 @@ If you were previously using `supabase start` from the `management-dashboard-web
|
||||
### Port Conflicts
|
||||
|
||||
If you get port conflicts, make sure:
|
||||
|
||||
- No other Supabase instances are running
|
||||
- The Supabase CLI isn't running containers (`supabase stop` if needed)
|
||||
|
||||
### Migration Issues
|
||||
|
||||
If migrations fail:
|
||||
|
||||
1. Check the logs: `docker compose logs supabase-migrate`
|
||||
2. Ensure migration files are valid SQL
|
||||
3. You may need to manually connect to the database and fix issues
|
||||
@@ -101,7 +111,7 @@ If migrations fail:
|
||||
### Database Connection Issues
|
||||
|
||||
If services can't connect to the database:
|
||||
|
||||
1. Check database is healthy: `docker compose ps supabase-db`
|
||||
2. Check logs: `docker compose logs supabase-db`
|
||||
3. Ensure the database password matches across all services
|
||||
|
||||
|
||||
Reference in New Issue
Block a user