From 2c9dd267bc096a25c86cb3b7a7009090c9023e20 Mon Sep 17 00:00:00 2001 From: JoshuaConcon Date: Wed, 17 Jul 2019 22:05:20 -0400 Subject: [PATCH] Setting up docker image --- utscfood-api/Dockerfile | 20 ++++++++++++++++++++ utscfood-api/{api.py => app.py} | 0 utscfood-api/requirements.txt | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 utscfood-api/Dockerfile rename utscfood-api/{api.py => app.py} (100%) create mode 100644 utscfood-api/requirements.txt diff --git a/utscfood-api/Dockerfile b/utscfood-api/Dockerfile new file mode 100644 index 0000000..ea788fa --- /dev/null +++ b/utscfood-api/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Python runtime as a parent image +FROM python:3.7-slim + +# Set the working directory to /app +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 --trusted-host pypi.python.org -r requirements.txt + +# Make port 80 available to the world outside this container +EXPOSE 80 + +# Define environment variable +ENV NAME World + +# Run app.py when the container launches +CMD ["python", "app.py"] \ No newline at end of file diff --git a/utscfood-api/api.py b/utscfood-api/app.py similarity index 100% rename from utscfood-api/api.py rename to utscfood-api/app.py diff --git a/utscfood-api/requirements.txt b/utscfood-api/requirements.txt new file mode 100644 index 0000000..8862084 --- /dev/null +++ b/utscfood-api/requirements.txt @@ -0,0 +1,2 @@ +Flask +Redis \ No newline at end of file