diff --git a/bin/run_sigi b/bin/run_sigi index 105b130..7cf3125 100755 --- a/bin/run_sigi +++ b/bin/run_sigi @@ -12,7 +12,12 @@ NUM_WORKERS=3 # = 2 * CPUs + 1 DJANGO_SETTINGS_MODULE=sigi.settings DJANGO_WSGI_MODULE=sigi.wsgi -echo "Starting $NAME as `whoami`" +echo "Data migrations before start..." +cd ${HOME} +python manage.py migrate +echo "...done" + +echo "Starting $NAME as `whoami`..." cd ${HOME} export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE diff --git a/docker/Dockerfile b/docker/Dockerfile index 3ac7687..7330199 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -95,8 +95,5 @@ ENV DEBIAN_FRONTEND=teletype VOLUME ["/srv/interlegis/sigi/media"] -# Data migration -RUN python manage.py migrate - # Start web server CMD service nginx start && /srv/interlegis/sigi/bin/run_sigi \ No newline at end of file