-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
28 lines (20 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use the official Python image from the Docker Hub, version 3.13-slim
FROM python:3.13-slim
# Set the working directory inside the container to /app
WORKDIR /app
# Copy the requirements.txt file from the host to the container
COPY requirements.txt .
# Install the Python dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org
# Update the package list and install Supervisor, then clean up the apt cache
RUN apt-get update && \
apt-get install -y supervisor && \
rm -rf /var/lib/apt/lists/*
# Copy the rest of the application code from the host to the container
COPY . .
# Expose port 5000 to allow external access to the application
EXPOSE 5000
# Copy the Supervisor configuration file to the appropriate directory
COPY prod/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Start Supervisor using the specified configuration file
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]