2019-02-28 13:09:53 +00:00
|
|
|
# pull official base image
|
|
|
|
FROM python:3.7.2
|
|
|
|
|
|
|
|
# set environment varibles
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
# set work directory
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
RUN pip install --upgrade pip
|
2020-07-28 12:48:21 +00:00
|
|
|
|
|
|
|
COPY ./requirements.txt /usr/src/app/requirements.txt
|
|
|
|
RUN pip install -r requirements.txt
|
2019-02-28 13:09:53 +00:00
|
|
|
|
|
|
|
# copy project
|
|
|
|
COPY . /usr/src/app/
|
|
|
|
|
2019-06-19 15:59:35 +00:00
|
|
|
# add wait for it
|
|
|
|
RUN git clone https://github.com/vishnubob/wait-for-it.git /wait-for-it
|
|
|
|
RUN chmod a+x /wait-for-it/wait-for-it.sh
|
2019-02-28 13:09:53 +00:00
|
|
|
|
2019-06-19 15:59:35 +00:00
|
|
|
# add entry point
|
2020-07-28 12:48:21 +00:00
|
|
|
COPY ./django-entrypoint.sh django-entrypoint.sh
|
|
|
|
ENTRYPOINT ["./django-entrypoint.sh"]
|