mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Add solutions for DIRECT_DATABASE_URL connection issues
This commit is contained in:
parent
3c06e2cf6c
commit
8d6a1e8f8e
1 changed files with 27 additions and 4 deletions
|
|
@ -24,15 +24,22 @@ DATABASE_URL=postgresql://user:password@host.pooler.supabase.com:6543/postgres?p
|
||||||
#### 2. DIRECT_DATABASE_URL (Direct Connection)
|
#### 2. DIRECT_DATABASE_URL (Direct Connection)
|
||||||
This URL connects directly to the database, bypassing pgbouncer.
|
This URL connects directly to the database, bypassing pgbouncer.
|
||||||
|
|
||||||
**Format:**
|
**For Vercel deployments, you have two options:**
|
||||||
|
|
||||||
|
**Option A: Use pooler for direct connection (Recommended for Vercel)**
|
||||||
|
```
|
||||||
|
DIRECT_DATABASE_URL=postgresql://user:password@host.pooler.supabase.com:6543/postgres
|
||||||
|
```
|
||||||
|
Note: Same as DATABASE_URL but without the `?pgbouncer=true&connect_timeout=15` parameters
|
||||||
|
|
||||||
|
**Option B: Use true direct connection (requires Supabase port 5432 access)**
|
||||||
```
|
```
|
||||||
DIRECT_DATABASE_URL=postgresql://user:password@host.supabase.com:5432/postgres
|
DIRECT_DATABASE_URL=postgresql://user:password@host.supabase.com:5432/postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
**Important notes:**
|
**Important notes:**
|
||||||
- Use port `5432` (direct postgres port)
|
- If port 5432 is not accessible from Vercel, use Option A
|
||||||
- Do **NOT** include pgbouncer parameters
|
- Port 5432 may need to be enabled in Supabase dashboard under Settings > Database > Connection Pooling
|
||||||
- Host should end with `.supabase.com` (without `.pooler`)
|
|
||||||
|
|
||||||
### For Other PostgreSQL Providers
|
### For Other PostgreSQL Providers
|
||||||
|
|
||||||
|
|
@ -52,6 +59,22 @@ Make sure you also have:
|
||||||
APP_SECRET=your-random-secret-key
|
APP_SECRET=your-random-secret-key
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Optional: Skip Database Migrations
|
||||||
|
|
||||||
|
If your database is already set up with migrations applied, you can skip migrations during build:
|
||||||
|
```
|
||||||
|
SKIP_DB_MIGRATION=true
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use this:**
|
||||||
|
- Database is already migrated
|
||||||
|
- You're doing a rebuild/redeploy
|
||||||
|
- Port 5432 is not accessible and you don't need migrations
|
||||||
|
|
||||||
|
**When NOT to use this:**
|
||||||
|
- First deployment with a new database
|
||||||
|
- After pulling code with new migrations
|
||||||
|
|
||||||
## Vercel Configuration
|
## Vercel Configuration
|
||||||
|
|
||||||
The `vercel.json` file has been configured with:
|
The `vercel.json` file has been configured with:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue