Spaces:
Runtime error
Runtime error
# Use the official slim Python image from the Docker library | |
FROM python:3.9-slim | |
# Set the working directory | |
WORKDIR /app | |
# Install MySQL development libraries | |
RUN apt-get update && apt-get install -y \ | |
default-libmysqlclient-dev \ | |
build-essential \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Add the application code to the Docker image | |
ADD . /app | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Expose the port the app runs on | |
EXPOSE 8000 | |
# Define the command to run the application | |
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "hello.wsgi:application"] | |