|
|
- # Use the official Python image as base
- FROM python:3.9-slim
-
- # Set environment variables
- ENV PYTHONDONTWRITEBYTECODE 1
- ENV PYTHONUNBUFFERED 1
-
- # Set the working directory in the container
- WORKDIR /app
-
- # Copy the requirements file into the container
- COPY requirements.txt .
-
- # Install dependencies
- RUN pip install --no-cache-dir -r requirements.txt
-
- # Copy the entire application into the container
- COPY . .
-
- # Create a volume for static files
- VOLUME /app/static
-
- # Expose the port the app runs on
- EXPOSE 5000
-
- # Command to run the application
- CMD python3 app.py
|