Update Dockerfile
Browse files- Dockerfile +6 -8
Dockerfile
CHANGED
@@ -23,16 +23,14 @@ COPY --chown=professor:professor . .
|
|
23 |
|
24 |
# Set environment variables
|
25 |
ENV LOG_PATH=/app/BotLog.txt
|
26 |
-
ENV
|
27 |
-
ENV
|
28 |
-
ENV FLASK_RUN_HOST=0.0.0.0
|
29 |
-
ENV FLASK_RUN_PORT=7860
|
30 |
|
31 |
# Ensure the log file is writable
|
32 |
RUN touch $LOG_PATH && chmod 666 $LOG_PATH
|
33 |
|
34 |
-
# Expose port
|
35 |
-
EXPOSE
|
36 |
|
37 |
-
# Start
|
38 |
-
CMD ["
|
|
|
23 |
|
24 |
# Set environment variables
|
25 |
ENV LOG_PATH=/app/BotLog.txt
|
26 |
+
ENV UVICORN_HOST=0.0.0.0
|
27 |
+
ENV UVICORN_PORT=8000
|
|
|
|
|
28 |
|
29 |
# Ensure the log file is writable
|
30 |
RUN touch $LOG_PATH && chmod 666 $LOG_PATH
|
31 |
|
32 |
+
# Expose port for FastAPI
|
33 |
+
EXPOSE 8000
|
34 |
|
35 |
+
# Start the FastAPI app
|
36 |
+
CMD ["uvicorn", "fastapi_app:app", "--host", "$UVICORN_HOST", "--port", "$UVICORN_PORT", "--log-level", "info"]
|