symposion_app/makemigrations.sh
James Polley fb5d0b8941 Create a dev docker container for makemigrations
* 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
2017-08-28 16:54:34 +10:00

4 lines
173 B
Bash
Executable file

#!/bin/bash -x
docker image build -f docker/Dockerfile.makemigrations -t makemigrations .
docker run -it --env-file=docker/laptop-mode-env -v $(pwd):/source makemigrations