GrowWithTalha commited on
Commit
75e1125
·
verified ·
1 Parent(s): 233c7e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -38,7 +38,6 @@ COPY scripts/ ./scripts/
38
  COPY alembic/ ./alembic/
39
  COPY alembic.ini ./
40
 
41
-
42
  # Change ownership to appuser
43
  RUN chown -R appuser:appuser /app /home/appuser/.local
44
 
@@ -48,12 +47,12 @@ USER appuser
48
  # Make sure scripts are on path for appuser
49
  ENV PATH=/home/appuser/.local/bin:$PATH
50
 
51
- # Expose port
52
- EXPOSE 8000
53
 
54
  # Health check
55
  HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
56
- CMD python -c "import requests; requests.get('http://localhost:8000/health')" || exit 1
57
 
58
- # Run application
59
- CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
38
  COPY alembic/ ./alembic/
39
  COPY alembic.ini ./
40
 
 
41
  # Change ownership to appuser
42
  RUN chown -R appuser:appuser /app /home/appuser/.local
43
 
 
47
  # Make sure scripts are on path for appuser
48
  ENV PATH=/home/appuser/.local/bin:$PATH
49
 
50
+ # Expose port (7860 is HF Spaces default, 8000 for other deployments)
51
+ EXPOSE 7860
52
 
53
  # Health check
54
  HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
55
+ CMD python -c "import requests; requests.get('http://localhost:7860/health')" || exit 1
56
 
57
+ # Run application on port 7860 for HF Spaces
58
+ CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]