2019-12-30 16:47:17 +00:00
|
|
|
FROM python:3.7
|
2019-11-22 14:28:07 +00:00
|
|
|
|
|
|
|
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/
|
2019-11-28 14:17:22 +00:00
|
|
|
RUN pipenv install --dev
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2019-12-30 20:06:04 +00:00
|
|
|
ENV FLASK_APP=./crc/__init__.py
|
2020-01-14 20:35:14 +00:00
|
|
|
RUN echo $FLASK_APP
|
2019-12-30 20:06:04 +00:00
|
|
|
|
2019-12-31 17:13:20 +00:00
|
|
|
# include rejoiner code (gets overriden by local changes)
|
|
|
|
COPY . /crc-workflow/
|
|
|
|
|
2019-12-31 16:31:30 +00:00
|
|
|
# run migrations
|
|
|
|
CMD ["pipenv", "run", "flask", "db", "upgrade"]
|
|
|
|
CMD ["pipenv", "run", "flask", "load-example-data"]
|
|
|
|
|
2019-11-22 14:28:07 +00:00
|
|
|
# run webserver by default
|
|
|
|
CMD ["pipenv", "run", "python", "/crc-workflow/run.py"]
|
|
|
|
|
2019-12-31 17:13:20 +00:00
|
|
|
|
2019-11-22 14:28:07 +00:00
|
|
|
# expose ports
|
|
|
|
EXPOSE 5000
|
2019-12-31 16:31:30 +00:00
|
|
|
|
|
|
|
|