From 28e3810e991d9267562f055364a993539946e6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 1 Sep 2022 10:40:07 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20no=20docker-file=20conform?= =?UTF-8?q?e=20instru=C3=A7=C3=A3o=20da=20COTIN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f089fa1..3ac7687 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -41,8 +41,8 @@ ENV AUTH_PROFILE_MODULE='' # Install env ENV RUN_PACKAGES gcc locales build-essential python3-dev graphviz \ - libgraphviz-dev pkg-config libpq-dev postgresql-client \ - libsasl2-dev libldap2-dev libssl-dev vim nginx + libgraphviz-dev pkg-config libpq-dev postgresql-client \ + libsasl2-dev libldap2-dev libssl-dev vim nginx # Install required packages RUN apt-get update && \ @@ -70,9 +70,9 @@ ADD . ${HOME} # Install python packages RUN pip install -qq --upgrade pip setuptools && \ if [ $DEBUG = False ]; then \ - pip install -qq -r ${HOME}/requirements/requirements.txt; \ + pip install -qq -r ${HOME}/requirements/requirements.txt; \ else \ - pip install -qq -r ${HOME}/requirements/dev-requirements.txt; \ + pip install -qq -r ${HOME}/requirements/dev-requirements.txt; \ fi # Generate a new secret key @@ -81,9 +81,6 @@ RUN echo $'\n\n'SECRET_KEY=`python manage.py generate_secret_key` >> ${HOME}/sig # Prepare run script to start application server RUN chmod +x ${HOME}/bin/run_sigi -# Data migration -RUN python manage.py migrate - # Static files RUN python manage.py collectstatic --noinput --clear @@ -97,4 +94,9 @@ EXPOSE 80/tcp 443/tcp 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