Fix dockerfile ?
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
.venv
|
||||
venv
|
||||
ENV
|
||||
env
|
||||
.env
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.git
|
||||
.gitignore
|
||||
+10
-10
@@ -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"]
|
||||
Reference in New Issue
Block a user