From 0762a6f1a8ce620c8c7c345482517d299a1dfbe5 Mon Sep 17 00:00:00 2001 From: Brian Walsh Date: Thu, 8 Apr 2021 12:03:12 -0700 Subject: [PATCH 1/2] Adds Dockerfile #46 --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..11c99cf4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# A simple container for gene-service. +# Runs service on port 80. +# Healthchecks service up every 5m. + +FROM python:3.7 +RUN pip install pipenv uvicorn[standard] +COPY . /app +WORKDIR /app +RUN if [ ! -f "Pipfile.lock" ] ; then pipenv lock ; else echo Pipfile.lock exists ; fi +RUN pipenv sync +EXPOSE 80 +RUN apt update ; apt install -y rsync +HEALTHCHECK --interval=5m --timeout=3s \ + CMD curl -f http://localhost/gene || exit 1 + +CMD pipenv run uvicorn gene.main:app --reload --port 80 --host 0.0.0.0 From 2ee47483f313c8b7fb9e182c836440bbdd2379af Mon Sep 17 00:00:00 2001 From: Brian Walsh Date: Fri, 9 Apr 2021 11:37:39 -0700 Subject: [PATCH 2/2] Removes --reload --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 11c99cf4..e3207f12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN apt update ; apt install -y rsync HEALTHCHECK --interval=5m --timeout=3s \ CMD curl -f http://localhost/gene || exit 1 -CMD pipenv run uvicorn gene.main:app --reload --port 80 --host 0.0.0.0 +CMD pipenv run uvicorn gene.main:app --port 80 --host 0.0.0.0