fb5d0b8941
* Adds a laptop-mode-env file which docker can read env variables from * Adds a Dockerfile.makemigrations; mostly identical to the main Dockerfile. Important difference: instead of the source being copied into the docker image at build time, it's mounted from the local machine at run time. * Adds a makemigrations shell script which builds an imagine using the Dockefile.makemigrations and then uses it to run makemigrations * Because the source is mounted from the local machine, any new migrations created are dumped in the developer's git checkout ready for adding to git. Rename .env -> docker/laptop-mode-env
22 lines
621 B
Text
22 lines
621 B
Text
FROM python:3.6
|
|
VOLUME /source
|
|
COPY constraints.txt requirements.txt /setup/
|
|
RUN set -ex \
|
|
&& buildDeps=' \
|
|
libmysqlclient-dev \
|
|
libffi-dev \
|
|
libfreetype6-dev \
|
|
libjpeg-dev \
|
|
libwebp-dev \
|
|
libpng-dev \
|
|
liblcms2-dev \
|
|
zlib1g-dev \
|
|
libmemcached-dev \
|
|
libsasl2-dev \
|
|
' \
|
|
&& apt-get update \
|
|
&& apt-get install -y git xmlsec1 libmysqlclient18 \
|
|
&& apt-get install -y $buildDeps --no-install-recommends
|
|
RUN pip install -c /setup/constraints.txt -r /setup/requirements.txt
|
|
CMD ["python","/source/manage.py", "makemigrations"]
|
|
|