From 5be6d9e2d4d21b61d7a2e1f9c64ba72ddc576dd8 Mon Sep 17 00:00:00 2001 From: Emerson Rocha Luiz Date: Sat, 11 Apr 2020 09:43:03 -0300 Subject: [PATCH] Testing 'python manage.py populate_database' (unsafe, likely to reset database, not production ready) (refs https://github.com/SimonbJohnson/quickX3/issues/69) --- Dockerfile | 5 +++-- docker-entrypoint.sh | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62a6535..e372298 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ # && yarn install \ # && yarn production-build -RUN git clone -b master --single-branch --depth=1 https://github.com/SimonbJohnson/quickX3.git /usr/src/app/ -# RUN git clone -b master --single-branch --depth=1 https://github.com/SimonbJohnson/quickX3.git /usr/src/app/ \ +# RUN git clone -b master --single-branch --depth=1 https://github.com/SimonbJohnson/quickX3.git /usr/src/app/ +RUN git clone -b adding-populate-database-command --single-branch --depth=1 https://github.com/SimonbJohnson/quickX3.git /usr/src/app/ +# RUN git clone -b adding-populate-database-command --single-branch --depth=1 https://github.com/SimonbJohnson/quickX3.git /usr/src/app/ \ # && chown node:node -R /home/node/uwazi/ \ # && cd /home/node/uwazi/ \ # && yarn install \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 0767f30..81c7725 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -12,4 +12,8 @@ python /usr/src/app/manage.py migrate +# Note: This is likely to reset the database, change it later to be optional +# see https://github.com/SimonbJohnson/quickX3/issues/69 +python /usr/src/app/manage.py populate_database + python /usr/src/app/manage.py runserver 0.0.0.0:8000