azils3 commited on
Commit
d63c4c5
·
verified ·
1 Parent(s): 10cf6e6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM python:3.10
2
 
3
  # Create a non-root user and set up permissions
@@ -14,6 +15,9 @@ COPY requirements.txt /requirements.txt
14
  RUN pip install -U pip && \
15
  pip install -U -r requirements.txt
16
 
 
 
 
17
  # Switch to non-root user
18
  USER myuser
19
  WORKDIR /app
@@ -27,4 +31,5 @@ ENV LOG_PATH=/app/BotLog.txt
27
  # Ensure the log file is writable
28
  RUN touch $LOG_PATH && chmod 666 $LOG_PATH
29
 
30
- CMD ["python", "bot.py"]
 
 
1
+ # File: C:\Users\Shakeel\Desktop\PROFESSOR-BOT\Dockerfile
2
  FROM python:3.10
3
 
4
  # Create a non-root user and set up permissions
 
15
  RUN pip install -U pip && \
16
  pip install -U -r requirements.txt
17
 
18
+ # Install Flask
19
+ RUN pip install Flask
20
+
21
  # Switch to non-root user
22
  USER myuser
23
  WORKDIR /app
 
31
  # Ensure the log file is writable
32
  RUN touch $LOG_PATH && chmod 666 $LOG_PATH
33
 
34
+ # Run bot and dashboard
35
+ CMD ["bash", "-c", "python bot.py & flask run --host=0.0.0.0 --port=7860 --debug=false"]