Fix dockerfile ?
Build, push image, and notify Watchtower / build-image (push) Successful in 3m16s
Build, push image, and notify Watchtower / notify (push) Successful in 14s

This commit is contained in:
2026-07-27 17:24:11 +02:00
parent 0f17e9dce6
commit 2c66a24e9d
2 changed files with 21 additions and 10 deletions
+10 -10
View File
@@ -1,24 +1,24 @@
FROM python:3.11-slim
# Set the working directory inside the container
# Prevent Python from writing .pyc files and buffer stdout/stderr
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/cloud
WORKDIR /cloud
# DEBUG
# RUN apt update && apt install -y dnsutils iputils-ping
# Copy the requirements file and install dependencies
# Copy requirements from build context root or relative path
COPY cloud/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
# Copy application source code
COPY cloud/ .
COPY shared/ ./shared/
# Ensure the photo storage directory exists so the app doesn't crash on startup
# Create photo storage directory
RUN mkdir -p storage/dishPhotos
# Expose the port the app will run on
EXPOSE 5000
# Use Gunicorn to run the application in production
CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--threads", "4", "--timeout", "300", "app:app"]
# Call gunicorn directly
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--threads", "4", "--timeout", "300", "app:app"]