azils3 commited on
Commit
0589899
·
verified ·
1 Parent(s): 087d192

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -23,14 +23,13 @@ COPY --chown=professor:professor . .
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"]
 
23
 
24
  # Set environment variables
25
  ENV LOG_PATH=/app/BotLog.txt
26
+ ENV PORT=7860
 
27
 
28
  # Ensure the log file is writable
29
  RUN touch $LOG_PATH && chmod 666 $LOG_PATH
30
 
31
+ # Expose port
32
+ EXPOSE 7860
33
 
34
+ # Start Pyrogram bot and FastAPI app
35
+ CMD ["sh", "-c", "python bot.py & uvicorn fastapi_app:app --host 0.0.0.0 --port 7860"]