Update Dockerfile
Browse files- Dockerfile +6 -17
Dockerfile
CHANGED
|
@@ -1,44 +1,33 @@
|
|
| 1 |
FROM evoapicloud/evolution-api:v2.3.6
|
| 2 |
|
| 3 |
# 1. Hugging Face Port Fix
|
| 4 |
-
# HF requires port 7860 to show the "Running" status
|
| 5 |
ENV PORT=7860
|
| 6 |
ENV SERVER_PORT=7860
|
| 7 |
EXPOSE 7860
|
| 8 |
-
|
| 9 |
-
# Ensure the app binds to all interfaces, not just localhost
|
| 10 |
ENV SERVER_HOST=0.0.0.0
|
| 11 |
|
| 12 |
# 2. Security Configuration
|
| 13 |
-
# This is the "Token" you will use in n8n (Header: apikey)
|
| 14 |
ENV AUTH_MODE=apikey
|
| 15 |
ENV AUTH_API_KEY=Your_Super_Secret_Token_Here
|
| 16 |
|
| 17 |
-
# 3. Server URL (
|
| 18 |
-
# Pattern: https://username-space-name.hf.space
|
| 19 |
ENV SERVER_URL=https://getzero11-whatsapp.hf.space
|
| 20 |
|
| 21 |
# 4. Supabase Database Configuration
|
| 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&connection_limit=1postgresql://postgres.jemtmwdsmwolragllgwq:Zeroget2525%26@aws-1-ap-northeast-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1&pgstatements=false"
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
#
|
| 30 |
-
ENV
|
|
|
|
| 31 |
|
| 32 |
# 5. Optimization for HF Free Tier
|
| 33 |
ENV CACHE_LOCAL_ENABLED=true
|
| 34 |
ENV CACHE_REDIS_ENABLED=false
|
| 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 |
-
#
|
| 43 |
ENV CONFIG_SESSION_PHONE_VERSION=2.3000.1030415680
|
| 44 |
ENV WEB_VERSION=2.3000.1030415680
|
|
|
|
| 1 |
FROM evoapicloud/evolution-api:v2.3.6
|
| 2 |
|
| 3 |
# 1. Hugging Face Port Fix
|
|
|
|
| 4 |
ENV PORT=7860
|
| 5 |
ENV SERVER_PORT=7860
|
| 6 |
EXPOSE 7860
|
|
|
|
|
|
|
| 7 |
ENV SERVER_HOST=0.0.0.0
|
| 8 |
|
| 9 |
# 2. Security Configuration
|
|
|
|
| 10 |
ENV AUTH_MODE=apikey
|
| 11 |
ENV AUTH_API_KEY=Your_Super_Secret_Token_Here
|
| 12 |
|
| 13 |
+
# 3. Server URL (Exact Space URL)
|
|
|
|
| 14 |
ENV SERVER_URL=https://getzero11-whatsapp.hf.space
|
| 15 |
|
| 16 |
# 4. Supabase Database Configuration
|
| 17 |
ENV DATABASE_ENABLED=true
|
| 18 |
ENV DATABASE_PROVIDER=postgresql
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
# FIX: Using Direct Port 5432 for everything to bypass the "stuck" pooler
|
| 21 |
+
# FIX: Added ?pgbouncer=true&connection_limit=1 to satisfy the engine
|
| 22 |
+
ENV DATABASE_CONNECTION_URI="postgresql://postgres.DB-NAME:PASSWORD@aws-1-ap-northeast-1.pooler.supabase.com:5432/postgres?pgbouncer=true&connection_limit=1"
|
| 23 |
+
ENV DIRECT_URL="postgresql://postgres.DB-NAME:PASSWORD@aws-1-ap-northeast-1.pooler.supabase.com:5432/postgres?connection_limit=1"
|
| 24 |
|
| 25 |
# 5. Optimization for HF Free Tier
|
| 26 |
ENV CACHE_LOCAL_ENABLED=true
|
| 27 |
ENV CACHE_REDIS_ENABLED=false
|
| 28 |
ENV DELAY_MESSAGES=true
|
|
|
|
|
|
|
|
|
|
| 29 |
ENV DATABASE_CONNECTION_MAX_POOL_SIZE=2
|
|
|
|
| 30 |
|
| 31 |
+
# 6. WhatsApp Version Fix (Ensures QR shows up)
|
| 32 |
ENV CONFIG_SESSION_PHONE_VERSION=2.3000.1030415680
|
| 33 |
ENV WEB_VERSION=2.3000.1030415680
|