DeMaking commited on
Commit
e6345e5
·
verified ·
1 Parent(s): 357295a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,23 +1,24 @@
1
  # Docker image with Python
2
  FROM python:3.10
3
 
4
- # Environment variables
5
  ENV PYTHONUNBUFFERED=1
6
  ENV PYTHONIOENCODING=utf-8
7
 
 
8
  RUN useradd -m -u 1000 user
9
 
10
  # Set working directory
11
  WORKDIR /app
12
 
13
- # Install dependencies
14
  COPY --chown=user ./requirements.txt requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
- # Install nslookup (dnsutils) for debugging
18
  RUN apt-get update && apt-get install -y dnsutils
19
 
20
- # Copy all app files into container
21
  COPY --chown=user . /app
22
 
23
  # Open the port that FastAPI will use
@@ -26,4 +27,5 @@ EXPOSE 7860
26
  # 5000
27
 
28
  # Run the startup script to launch both FastAPI and Telegram Bot
29
- # CMD ["bash", "start.sh"]
 
 
1
  # Docker image with Python
2
  FROM python:3.10
3
 
4
+ # Set environment variables for python
5
  ENV PYTHONUNBUFFERED=1
6
  ENV PYTHONIOENCODING=utf-8
7
 
8
+ # Create a user for the application
9
  RUN useradd -m -u 1000 user
10
 
11
  # Set working directory
12
  WORKDIR /app
13
 
14
+ # Copy and Install dependencies
15
  COPY --chown=user ./requirements.txt requirements.txt
16
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
17
 
18
+ # Install nslookup (dnsutils) for debugging (optional)
19
  RUN apt-get update && apt-get install -y dnsutils
20
 
21
+ # Copy all project files into the container
22
  COPY --chown=user . /app
23
 
24
  # Open the port that FastAPI will use
 
27
  # 5000
28
 
29
  # Run the startup script to launch both FastAPI and Telegram Bot
30
+ # Use the start.sh script to launch the application (FAST API)
31
+ CMD ["bash", "start.sh"]