From d0b8e8b592242a18abc629edd5076f11cff1df90 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Wed, 26 Aug 2020 17:55:53 +0200 Subject: [PATCH] Minor cleanup. --- services/base/Dockerfile | 4 ++-- services/webapp/Dockerfile | 8 ++++---- services/webapp/run_webapp.sh | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/base/Dockerfile b/services/base/Dockerfile index 8ad1438..81d54df 100644 --- a/services/base/Dockerfile +++ b/services/base/Dockerfile @@ -60,10 +60,10 @@ RUN echo "source /env.sh" > /rosetta/.bash_profile #------------------------ # Create dirs -RUN mkdir /data && mkdir /opt/rosetta && mkdir /var/log/rosetta +RUN mkdir /data && mkdir /var/log/rosetta # Give right permissions -RUN chown -R rosetta:rosetta /data && chown -R rosetta:rosetta /opt/rosetta && chown -R rosetta:rosetta /var/log/rosetta +RUN chown -R rosetta:rosetta /data && chown -R rosetta:rosetta /var/log/rosetta #---------------------- diff --git a/services/webapp/Dockerfile b/services/webapp/Dockerfile index 4030671..27fa190 100644 --- a/services/webapp/Dockerfile +++ b/services/webapp/Dockerfile @@ -45,20 +45,20 @@ RUN apt-get install docker.io -y #------------------------------ # Prepare dir -RUN mkdir /opt/webapp_code +RUN mkdir /opt/code # Install Python requirements.. COPY requirements.txt /tmp/ -RUN cd /opt/webapp_code && pip3 install -r /tmp/requirements.txt +RUN cd /opt/code && pip3 install -r /tmp/requirements.txt # Patch Django 2.2 non-ascii chars in /usr/local/lib/python3.6/dist-packages/django/views/templates/technical_500.html RUN sed -i 's/[\x80-\xFF]/./g' /usr/local/lib/python3.6/dist-packages/django/views/templates/technical_500.html # Install App code -COPY code /opt/webapp_code +COPY code /opt/code # Fix permissions -RUN chown -R rosetta:rosetta /opt/webapp_code +RUN chown -R rosetta:rosetta /opt/code # Copy db conf COPY db_conf.sh /db_conf.sh diff --git a/services/webapp/run_webapp.sh b/services/webapp/run_webapp.sh index 1fdf82a..a208e0e 100644 --- a/services/webapp/run_webapp.sh +++ b/services/webapp/run_webapp.sh @@ -47,7 +47,7 @@ export PYTHONUNBUFFERED=on # Check if there is something to migrate or populate echo "" echo "2) Making migrations..." -cd /opt/webapp_code && $DJANGO_PYTHON manage.py makemigrations --noinput +cd /opt/code && $DJANGO_PYTHON manage.py makemigrations --noinput EXIT_CODE=$? echo "Exit code: $EXIT_CODE" if [[ "x$EXIT_CODE" != "x0" ]] ; then @@ -58,7 +58,7 @@ fi echo "" echo "3) Migrating..." -cd /opt/webapp_code && $DJANGO_PYTHON manage.py migrate --noinput +cd /opt/code && $DJANGO_PYTHON manage.py migrate --noinput EXIT_CODE=$? echo "Exit code: $EXIT_CODE" if [[ "x$EXIT_CODE" != "x0" ]] ; then @@ -69,7 +69,7 @@ fi echo "" echo "4) Populating core app..." -cd /opt/webapp_code && $DJANGO_PYTHON manage.py core_app_populate +cd /opt/code && $DJANGO_PYTHON manage.py core_app_populate EXIT_CODE=$? echo "Exit code: $EXIT_CODE" if [[ "x$EXIT_CODE" != "x0" ]] ; then -- GitLab