api dockerfile
All checks were successful
Build and Push Docker Images / build (push) Successful in 37s
All checks were successful
Build and Push Docker Images / build (push) Successful in 37s
This commit is contained in:
parent
c390e7559d
commit
96e42454b1
@ -1,17 +1,17 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
# Use the official Python image from the Docker Hub
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the current directory contents into the container at /app
|
||||
COPY . /app
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Install the required Python packages
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Make port 5000 available to the world outside this container
|
||||
# Expose port 5000 to the outside world
|
||||
EXPOSE 5000
|
||||
|
||||
# Run gunicorn server
|
||||
# Command to run the app using Gunicorn
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
|
||||
|
@ -20,4 +20,4 @@ def get_jobs():
|
||||
return jsonify(jobs)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=False, host='0.0.0.0')
|
||||
app.run(host='0.0.0.0', port=5000)
|
||||
|
Loading…
Reference in New Issue
Block a user