File size: 592 Bytes
a4bef0b
 
 
12e3afc
 
a4bef0b
 
12e3afc
a4bef0b
 
 
 
 
 
 
12e3afc
a4bef0b
12e3afc
 
 
 
 
 
a4bef0b
12e3afc
a4bef0b
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
set -e

echo "Starting Dify services..."

# Start API server in background
cd /app/api
echo "Starting API server on port 5001..."
gunicorn --bind 0.0.0.0:5001 \
    --workers 1 \
    --worker-class gevent \
    --timeout 200 \
    --preload \
    app:app &

# Start Next.js web server
cd /app/web
echo "Starting Next.js server on port 3000..."
# Use the standalone server with proper static file handling
cp -r .next/static .next/standalone/.next/static
cp -r public .next/standalone/public
cd .next/standalone
NODE_ENV=production node server.js &

# Wait for both processes
wait