Skip to content
Snippets Groups Projects
Commit d0b8e8b5 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Minor cleanup.

parent 3cf017cf
No related branches found
No related tags found
No related merge requests found
......@@ -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
#----------------------
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment