Aqso commited on
Commit
d989c0e
·
verified ·
1 Parent(s): c0e716b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -11
Dockerfile CHANGED
@@ -15,20 +15,19 @@ RUN mv $(command -v node) /usr/bin/python-internal-service && \
15
 
16
  WORKDIR /home/user
17
 
18
- # 3. INSTALL DEPS (Direct)
19
  RUN pip install --no-cache-dir fastapi uvicorn httpx websockets
20
 
21
- # 4. COPY SEMUA FILE DULU
22
- COPY --with-ownership=user:user . .
23
 
24
- # 5. GENERATE SCRIPT (Echo Method - Paling Aman)
25
- # DNS Google & Cloudflare suntik via NODE_OPTIONS
26
- RUN echo "#!/bin/bash" > entrypoint.sh
27
- RUN echo "export NODE_OPTIONS='--dns-result-order=ipv4first'" >> entrypoint.sh
28
- RUN echo "ttyd -p 8080 bash &" >> entrypoint.sh
29
- RUN echo "if [ -f 'bot.js' ]; then python-internal-service bot.js & fi" >> entrypoint.sh
30
- RUN echo "python main.py" >> entrypoint.sh
31
- RUN chmod +x entrypoint.sh
32
 
33
  USER user
34
  EXPOSE 7860
 
15
 
16
  WORKDIR /home/user
17
 
18
+ # 3. INSTALL DEPS
19
  RUN pip install --no-cache-dir fastapi uvicorn httpx websockets
20
 
21
+ # 4. FIX: Pake --chown (Standar Docker)
22
+ COPY --chown=user:user . .
23
 
24
+ # 5. GENERATE SCRIPT (DNS Google & Cloudflare Included)
25
+ RUN echo "#!/bin/bash" > entrypoint.sh && \
26
+ echo "export NODE_OPTIONS='--dns-result-order=ipv4first'" >> entrypoint.sh && \
27
+ echo "ttyd -p 8080 bash &" >> entrypoint.sh && \
28
+ echo "if [ -f 'bot.js' ]; then python-internal-service bot.js & fi" >> entrypoint.sh && \
29
+ echo "python main.py" >> entrypoint.sh && \
30
+ chmod +x entrypoint.sh
 
31
 
32
  USER user
33
  EXPOSE 7860