worker4 / Dockerfile
worker-3's picture
Update Dockerfile
5403e96 verified
Raw
History Blame Contribute Delete
928 Bytes
FROM python:3.10-slim-bullseye
WORKDIR /app
# 1. Temel Araçları Kur
RUN apt-get update && apt-get install -y \
libc-ares2 libcrypto++-dev libmediainfo0v5 libssl-dev \
libcurl4 libsqlite3-0 libfreeimage3 \
libpcrecpp0v5 libsodium23 libzen0v5 ca-certificates \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# 2. SENİN YÜKLEDİĞİN DOSYAYI KOPYALA
COPY mega.deb /app/mega.deb
# 3. MegaCMD Kurulumu (Offline)
# Önce kurmayı dener, bağımlılık hatası verirse 'apt-get -f install' ile düzeltir.
RUN dpkg -i /app/mega.deb || (apt-get update && apt-get -f install -y) \
&& rm /app/mega.deb
# 4. Python Gereksinimleri
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. Uygulama Dosyası
COPY app.py .
# 6. İndirme Klasörü İzni
RUN mkdir -p /tmp/downloads && chmod 777 /tmp/downloads
# 7. Başlatma
ENV PORT=7860
EXPOSE 7860
CMD ["python", "app.py"]