From a35624b457301d7584e8a1cf8083bad2bd1cac28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 1 Sep 2022 11:34:22 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20na=20dockeriza=C3=A7?= =?UTF-8?q?=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/run_sigi | 7 ++++++- docker/Dockerfile | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) 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