File size: 955 Bytes
5e518ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# run.sh

set -euo pipefail

echo "Starting Evolution API in production mode"

# تعديل متغيرات البيئة من القيم المخزنة في Huggingface Space
if [ -n "${REDIS_PASSWORD:-}" ]; then
  export CACHE_REDIS_URI="rediss://default:${REDIS_PASSWORD}@related-ant-6145.upstash.io:6379"
  echo "Redis connection configured with online service"
fi

if [ -n "${DATABASE_PASSWORD:-}" ]; then
  export DATABASE_URL="postgresql://postgres.spnhuzaclgccmmunhmfc:${DATABASE_PASSWORD}@aws-0-eu-north-1.pooler.supabase.com:5432/postgres"
  export DATABASE_CONNECTION_URI="postgresql://postgres.spnhuzaclgccmmunhmfc:${DATABASE_PASSWORD}@aws-0-eu-north-1.pooler.supabase.com:6543/postgres"
  echo "Database connection configured with Supabase"
fi

if [ -n "${API_KEY:-}" ]; then
  export AUTHENTICATION_API_KEY="${API_KEY}"
  echo "API key configured"
fi

# بدء تشغيل Evolution API في وضع الإنتاج
npm run start:prod