Merge pull request #1 from sartography/fred/dockerize

Fred/dockerize
This commit is contained in:
Dan Funk 2019-12-20 14:37:14 -05:00 committed by GitHub
commit 121abfbc5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

26
Dockerfile Normal file
View File

@ -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 --dev
# 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

2
run.py
View File

@ -1,3 +1,3 @@
from crc import app
if __name__ == "__main__":
app.run()
app.run(host='0.0.0.0')