diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..9a0b7508 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM python:3.6-stretch + +ENV PATH=/root/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +# install node and yarn +RUN apt-get update +RUN apt-get -y install postgresql-client + +# config project dir +RUN mkdir /crc-workflow +WORKDIR /crc-workflow + +# install python requirements +RUN pip install pipenv +ADD Pipfile /crc-workflow/ +ADD Pipfile.lock /crc-workflow/ +RUN pipenv install + +# include rejoiner code (gets overriden by local changes) +COPY . /crc-workflow/ + +# run webserver by default +CMD ["pipenv", "run", "python", "/crc-workflow/run.py"] + +# expose ports +EXPOSE 5000 diff --git a/run.py b/run.py index c089befb..f5bd7b4e 100644 --- a/run.py +++ b/run.py @@ -1,3 +1,3 @@ from app import app if __name__ == "__main__": - app.run() + app.run(host='0.0.0.0')