anik-jha commited on
Commit
cee0f63
·
1 Parent(s): 79b6793

updated port

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. app.py +1 -1
Dockerfile CHANGED
@@ -42,14 +42,14 @@ COPY app.py .
42
  USER appuser
43
 
44
  # Set environment variables
45
- ENV PORT=5000
46
 
47
  # Expose port
48
- EXPOSE 5000
49
 
50
  # Health check
51
  HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
52
- CMD curl -f http://localhost:5000/ || exit 1
53
 
54
  # Run the loader which will download and execute the private space code
55
  CMD ["python", "app.py"]
 
42
  USER appuser
43
 
44
  # Set environment variables
45
+ ENV PORT=7860
46
 
47
  # Expose port
48
+ EXPOSE 7860
49
 
50
  # Health check
51
  HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
52
+ CMD curl -f http://localhost:7860/ || exit 1
53
 
54
  # Run the loader which will download and execute the private space code
55
  CMD ["python", "app.py"]
app.py CHANGED
@@ -117,7 +117,7 @@ def load_and_run_app():
117
  # Try to find and run the Flask app
118
  if hasattr(app_module, 'app'):
119
  print("✓ Flask app found, starting server...")
120
- port = int(os.getenv('PORT', 5000))
121
  app_module.app.run(host='0.0.0.0', port=port, debug=False)
122
  else:
123
  print("✓ Application module loaded successfully!")
 
117
  # Try to find and run the Flask app
118
  if hasattr(app_module, 'app'):
119
  print("✓ Flask app found, starting server...")
120
+ port = int(os.getenv('PORT', 7860))
121
  app_module.app.run(host='0.0.0.0', port=port, debug=False)
122
  else:
123
  print("✓ Application module loaded successfully!")