Update Dockerfile for correct directory structure
Browse files- docker/entrypoint.sh +11 -3
docker/entrypoint.sh
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
#!/bin/bash
|
2 |
set -e
|
3 |
|
|
|
|
|
4 |
# Start API server in background
|
5 |
cd /app/api
|
|
|
6 |
gunicorn --bind 0.0.0.0:5001 \
|
7 |
--workers 1 \
|
8 |
--worker-class gevent \
|
@@ -10,9 +13,14 @@ gunicorn --bind 0.0.0.0:5001 \
|
|
10 |
--preload \
|
11 |
app:app &
|
12 |
|
13 |
-
# Start web server
|
14 |
cd /app/web
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
#
|
18 |
wait
|
|
|
1 |
#!/bin/bash
|
2 |
set -e
|
3 |
|
4 |
+
echo "Starting Dify services..."
|
5 |
+
|
6 |
# Start API server in background
|
7 |
cd /app/api
|
8 |
+
echo "Starting API server on port 5001..."
|
9 |
gunicorn --bind 0.0.0.0:5001 \
|
10 |
--workers 1 \
|
11 |
--worker-class gevent \
|
|
|
13 |
--preload \
|
14 |
app:app &
|
15 |
|
16 |
+
# Start Next.js web server
|
17 |
cd /app/web
|
18 |
+
echo "Starting Next.js server on port 3000..."
|
19 |
+
# Use the standalone server with proper static file handling
|
20 |
+
cp -r .next/static .next/standalone/.next/static
|
21 |
+
cp -r public .next/standalone/public
|
22 |
+
cd .next/standalone
|
23 |
+
NODE_ENV=production node server.js &
|
24 |
|
25 |
+
# Wait for both processes
|
26 |
wait
|