Merge branch 'dev' into rrt/testing

This commit is contained in:
Aaron Louie 2020-05-20 16:34:21 -04:00
commit 29b1d43006
1 changed files with 15 additions and 19 deletions

View File

@ -1,27 +1,23 @@
FROM python:3.7
FROM python:3.7-slim
ENV PATH=/root/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
WORKDIR /app
# install node and yarn
RUN apt-get update
RUN apt-get -y install postgresql-client
COPY Pipfile Pipfile.lock /app/
# config project dir
RUN mkdir /crc-workflow
WORKDIR /crc-workflow
RUN pip install pipenv && \
apt-get update && \
apt-get install -y --no-install-recommends \
gcc python3-dev libssl-dev postgresql-client git-core && \
pipenv install --dev && \
apt-get remove -y gcc python3-dev libssl-dev && \
apt-get purge -y --auto-remove && \
rm -rf /var/lib/apt/lists/ *
# install python requirements
RUN pip install pipenv
ADD Pipfile /crc-workflow/
ADD Pipfile.lock /crc-workflow/
RUN pipenv install --dev
COPY . /app/
# include rejoiner code (gets overriden by local changes)
COPY . /crc-workflow/
# run webserver by default
ENV FLASK_APP=./crc/__init__.py
CMD ["pipenv", "run", "python", "./run.py"]
ENV FLASK_APP=/app/crc/__init__.py
CMD ["pipenv", "run", "flask", "db", "upgrade"]
CMD ["pipenv", "run", "python", "/app/run.py"]
# expose ports
EXPOSE 5000