CoolFace
Apppublic

TCETMILI/PassportExtractor

sourceHugging Faceupdated 7mo agoView on Hugging Face
1likes
Dockerfile56 linesDownload Raw Back to root
1FROM python:3.11-slim-bookworm2 3WORKDIR /app4 5# 1. Sistem Bağımlılıkları (OpenCV, PDF tools)6RUN apt-get update && apt-get install -y \7    build-essential \8    cmake \9    libgl1 \10    libglib2.0-0 \11    poppler-utils \12    nginx \13    nodejs \14    npm \15    && rm -rf /var/lib/apt/lists/*16 17# 2. Python Bağımlılıkları18ENV CMAKE_BUILD_PARALLEL_LEVEL=119 20COPY requirements.txt .21RUN pip install --no-cache-dir -r requirements.txt22 23# 3. Backend Kodunu Kopyala24COPY backend ./backend25 26# 4. Frontend Build27COPY frontend_v2 ./frontend_v228WORKDIR /app/frontend_v229RUN npm install && npm run build30WORKDIR /app31 32# 5. Nginx için frontend dosyalarını kopyala33RUN cp -r /app/frontend_v2/dist/* /var/www/html/ || mkdir -p /var/www/html34COPY frontend_v2/nginx.conf /etc/nginx/conf.d/default.conf35 36# 6. Klasör Yapısı (Output ve Cache için)37RUN mkdir -p output/cache/passports output/cache/face_encodings output/FOTO output/TCFOTO output/EXCEL output/OKUNAMADI38RUN chmod -R 777 /app/output39 40# 7. Ortam Değişkenleri41ENV DEPLOYMENT_MODE="WEB"42ENV BACKEND_URL="http://127.0.0.1:8000"43ENV PORT=786044ENV HF_HOME="/app/output/cache"45 46# 8. Portlar47EXPOSE 786048EXPOSE 800049 50# 9. Başlatma Scripti51COPY start.sh .52RUN chmod +x start.sh53 54# 10. Başlat55CMD ["./start.sh"]56