sw-jobs-api/api/Dockerfile

18 lines
438 B
Docker
Raw Normal View History

2024-06-01 15:16:31 +00:00
# Use the official Python image from the Docker Hub
2024-05-29 21:28:58 +00:00
FROM python:3.9-slim
2024-06-01 15:16:31 +00:00
# Set the working directory inside the container
2024-05-29 21:28:58 +00:00
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
2024-06-01 15:16:31 +00:00
# Install the required Python packages
RUN pip install -r requirements.txt
2024-05-29 21:28:58 +00:00
2024-06-01 15:16:31 +00:00
# Expose port 5000 to the outside world
2024-05-29 21:28:58 +00:00
EXPOSE 5000
2024-06-01 15:16:31 +00:00
# Command to run the app using Gunicorn
2024-05-29 21:28:58 +00:00
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]