diff options
| author | Michael Herman <hermanmu@gmail.com> | 2019-08-07 04:50:42 -0600 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-08-07 12:50:42 +0200 |
| commit | 2a0643de4ed5290617410cef27af71c4598af767 (patch) | |
| tree | dc1e806083c630da3a8fbcd49bc5d75cc0202890 /Dockerfile | |
| parent | ec1b00e1753c3fdc3980f72d5192667b03edbf10 (diff) | |
Added docker compose option for local development.
Closes #408
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5ee476a8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +# pull official base image +FROM python:3.5.7-alpine + +# set work directory +WORKDIR /usr/src/app + +# set environment varibles +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + +# install psycopg2 +RUN apk update \ + && apk add --virtual build-deps gcc python3-dev musl-dev \ + && apk add postgresql-dev \ + && pip install psycopg2 \ + && apk del build-deps + +# install node and npm +RUN apk add --update nodejs nodejs-npm + +# install pillow dependencies +RUN apk add build-base python-dev py-pip jpeg-dev zlib-dev +ENV LIBRARY_PATH=/lib:/usr/lib + +# install psql client +RUN apk --update add postgresql-client + +# install git +RUN apk add git + +# install dependencies +RUN pip install --upgrade pip +COPY ./requirements ./requirements +RUN pip install -r ./requirements/dev.txt +RUN pip install -r ./requirements/tests.txt +RUN pip install tox +RUN npm install + +# copy docker-entrypoint.sh +COPY ./docker-entrypoint.sh ./docker-entrypoint.sh + +# copy project +COPY . . + +# run docker-entrypoint.sh +ENTRYPOINT ["./docker-entrypoint.sh"] |
