Browse Source

Correções na dockerização

pull/159/head
Sesostris Vieira 2 years ago
parent
commit
a35624b457
  1. 7
      bin/run_sigi
  2. 3
      docker/Dockerfile

7
bin/run_sigi

@ -12,7 +12,12 @@ NUM_WORKERS=3 # = 2 * CPUs + 1
DJANGO_SETTINGS_MODULE=sigi.settings DJANGO_SETTINGS_MODULE=sigi.settings
DJANGO_WSGI_MODULE=sigi.wsgi 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} cd ${HOME}
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE

3
docker/Dockerfile

@ -95,8 +95,5 @@ ENV DEBIAN_FRONTEND=teletype
VOLUME ["/srv/interlegis/sigi/media"] VOLUME ["/srv/interlegis/sigi/media"]
# Data migration
RUN python manage.py migrate
# Start web server # Start web server
CMD service nginx start && /srv/interlegis/sigi/bin/run_sigi CMD service nginx start && /srv/interlegis/sigi/bin/run_sigi
Loading…
Cancel
Save