Severian commited on
Commit
12e3afc
1 Parent(s): a4bef0b

Update Dockerfile for correct directory structure

Browse files
Files changed (1) hide show
  1. 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
- npm start
 
 
 
 
 
16
 
17
- # Keep container running
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