MyanmarSwe commited on
Commit
31cc305
·
verified ·
1 Parent(s): 6111aa4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,25 +1,26 @@
1
  FROM python:3.10-slim-bookworm
2
 
3
- # System packages များ သွင်းခြင်း
4
  RUN apt-get update && apt-get upgrade -y && \
5
  apt-get install -y --no-install-recommends git gcc python3-dev libffi-dev musl-dev
6
 
7
  WORKDIR /app
8
 
9
- # Repository ကို Clone လုပ်ခြင်း
10
  RUN git clone https://github.com/rayanfer32/TgindexPro.git .
11
 
12
- # Python libraries သွင်းခြင်း
13
  RUN pip3 install --no-cache-dir -r requirements.txt
14
 
15
- # Port သတ်မှတ်ခြင်း
16
  ENV PORT=7860
17
  ENV PYTHONUNBUFFERED=1
18
  EXPOSE 7860
19
 
20
- # ဖိုင်တည်ရှိမှုကို စစ်ဆေးပြီး သင့်တော်ရာကို Run ခြင်း
21
- CMD echo "🚀 Checking files and starting application..." && \
22
- if [ -f "main.py" ]; then python3 main.py; \
23
- elif [ -f "app.py" ]; then python3 app.py; \
24
- elif [ -f "start.sh" ]; then sh start.sh; \
25
- else python3 -m api; fi
 
 
1
  FROM python:3.10-slim-bookworm
2
 
3
+ # အဆင့် (၁) - လိုအပ်သော System packages များ သွင်းခြင်း
4
  RUN apt-get update && apt-get upgrade -y && \
5
  apt-get install -y --no-install-recommends git gcc python3-dev libffi-dev musl-dev
6
 
7
  WORKDIR /app
8
 
9
+ # အဆင့် (၂) - Repository ကို Clone လုပ်ခြင်း
10
  RUN git clone https://github.com/rayanfer32/TgindexPro.git .
11
 
12
+ # အဆင့် (၃) - Python libraries များ သွင်းခြင်း
13
  RUN pip3 install --no-cache-dir -r requirements.txt
14
 
15
+ # အဆင့် (၄) - Port နှင့် Log Setting များ သတ်မှတ်ခြင်း
16
  ENV PORT=7860
17
  ENV PYTHONUNBUFFERED=1
18
  EXPOSE 7860
19
 
20
+ # အဆင့် (၅) - Folder ထဲရှိ ဖိုင်များကို အရင်ပြပြီးမှ သင့်တော်ရာကို Run ခြင်း
21
+ CMD echo "📂 Listing all files in current directory..." && ls -R && \
22
+ echo "🚀 Starting Application..." && \
23
+ if [ -f "main.py" ]; then python3 -u main.py; \
24
+ elif [ -d "api" ] && [ -f "api/__main__.py" ]; then python3 -u -m api; \
25
+ elif [ -f "app.py" ]; then python3 -u app.py; \
26
+ else python3 -u -m api; fi