Files
AreWeBuried/Dockerfile
2026-01-24 19:23:26 -05:00

24 lines
522 B
Docker

# Use Python 3.12 slim image
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Copy and install dependencies first (cache-friendly)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the app
COPY app.py .
COPY config.py .
COPY utils/ ./utils
COPY templates/ ./templates
COPY static/ ./static
# Expose the Flask port
EXPOSE 5000
# Run the app with Gunicorn, 4 workers, 2 threads each
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app", "-w", "4", "--threads", "2"]