getzero11 commited on
Commit
fd0be39
·
verified ·
1 Parent(s): f26cb68

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -22,7 +22,12 @@ ENV SERVER_URL=https://getzero11-whatsapp.hf.space
22
  ENV DATABASE_ENABLED=true
23
  ENV DATABASE_PROVIDER=postgresql
24
  # Use the URI you copied from Supabase here:
25
- ENV DATABASE_CONNECTION_URI=postgresql://postgres:[PASSWORD]@[HOST]:5432/postgres
 
 
 
 
 
26
 
27
  # 5. Optimization for HF Free Tier
28
  ENV CACHE_LOCAL_ENABLED=true
@@ -30,8 +35,9 @@ ENV CACHE_REDIS_ENABLED=false
30
  ENV DELAY_MESSAGES=true
31
 
32
  # 6. Limit the number of simultaneous connections Prisma opens
33
- ENV DATABASE_CONNECTION_MAX_POOL_SIZE=5
34
- ENV DATABASE_CONNECTION_TIMEOUT=30
 
35
 
36
  # 7. Force a newer WhatsApp Web version to fix the QR/Loop issue
37
  ENV CONFIG_SESSION_PHONE_VERSION=2.3000.1030415680
 
22
  ENV DATABASE_ENABLED=true
23
  ENV DATABASE_PROVIDER=postgresql
24
  # Use the URI you copied from Supabase here:
25
+ # The main connection string (with port 6543 and pgbouncer=true)
26
+ ENV DATABASE_CONNECTION_URI="postgresql://postgres:[PASSWORD]@aws-1-ap-northeast-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
27
+
28
+ # Add the DIRECT URL (using port 5432)
29
+ # This is used ONLY for the 'db:deploy' step that is currently sticking
30
+ ENV DIRECT_URL="postgresql://postgres:[PASSWORD]@aws-1-ap-northeast-1.pooler.supabase.com:5432/postgres"
31
 
32
  # 5. Optimization for HF Free Tier
33
  ENV CACHE_LOCAL_ENABLED=true
 
35
  ENV DELAY_MESSAGES=true
36
 
37
  # 6. Limit the number of simultaneous connections Prisma opens
38
+ # Add these to help Prisma manage the pool
39
+ ENV DATABASE_CONNECTION_MAX_POOL_SIZE=2
40
+ ENV DATABASE_CONNECTION_TIMEOUT=60
41
 
42
  # 7. Force a newer WhatsApp Web version to fix the QR/Loop issue
43
  ENV CONFIG_SESSION_PHONE_VERSION=2.3000.1030415680