24 lines
709 B
Docker
24 lines
709 B
Docker
FROM python:3.11-slim
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /cloud
|
|
|
|
# DEBUG
|
|
# RUN apt update && apt install -y dnsutils iputils-ping
|
|
|
|
# Copy the requirements file and install dependencies
|
|
COPY cloud/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the rest of the application code
|
|
COPY cloud/ .
|
|
COPY shared/ ./shared/
|
|
|
|
# Ensure the photo storage directory exists so the app doesn't crash on startup
|
|
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"] |