Severian commited on
Commit
bfcf4f7
·
verified ·
1 Parent(s): 5a5ea88

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -63,6 +63,8 @@ ENV FLASK_APP=app.py \
63
  CONSOLE_WEB_URL=http://127.0.0.1:3000 \
64
  SERVICE_API_URL=http://127.0.0.1:7860 \
65
  APP_WEB_URL=http://127.0.0.1:3000 \
 
 
66
  DB_USERNAME=postgres \
67
  DB_PASSWORD=difyai123456 \
68
  DB_HOST=db \
@@ -85,12 +87,12 @@ echo "===== Application Startup at $(date "+%Y-%m-%d %H:%M:%S") ====="\n\
85
  echo "Starting Dify services..."\n\
86
  cd /app/api && \
87
  poetry run python -m gunicorn app:app \
88
- --bind 0.0.0.0:7860 \
89
  --worker-class gevent \
90
  --workers 1 \
91
  --timeout 300 \
92
  --preload &\n\
93
- echo "Starting API server on port 7860..."\n\
94
  cd /app/web && node server.js &\n\
95
  echo "Starting Next.js server on port 3000..."\n\
96
  wait' > /app/entrypoint.sh && \
 
63
  CONSOLE_WEB_URL=http://127.0.0.1:3000 \
64
  SERVICE_API_URL=http://127.0.0.1:7860 \
65
  APP_WEB_URL=http://127.0.0.1:3000 \
66
+ DIFY_PORT=7860 \
67
+ DIFY_BIND_ADDRESS=0.0.0.0 \
68
  DB_USERNAME=postgres \
69
  DB_PASSWORD=difyai123456 \
70
  DB_HOST=db \
 
87
  echo "Starting Dify services..."\n\
88
  cd /app/api && \
89
  poetry run python -m gunicorn app:app \
90
+ --bind ${DIFY_BIND_ADDRESS:-0.0.0.0}:${DIFY_PORT:-7860} \
91
  --worker-class gevent \
92
  --workers 1 \
93
  --timeout 300 \
94
  --preload &\n\
95
+ echo "Starting API server on port ${DIFY_PORT:-7860}..."\n\
96
  cd /app/web && node server.js &\n\
97
  echo "Starting Next.js server on port 3000..."\n\
98
  wait' > /app/entrypoint.sh && \