From d1d432181c5e0530d7970d780ff2c16b984564ec Mon Sep 17 00:00:00 2001 From: Nico Vermaas <vermaas@astron.nl> Date: Fri, 15 Jul 2022 14:47:09 +0200 Subject: [PATCH] migrate database --- ldvspec/Dockerfile | 1 - ldvspec/docker/docker-compose-dev-cd.yml | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ldvspec/Dockerfile b/ldvspec/Dockerfile index b60fd26c..9487e6d4 100644 --- a/ldvspec/Dockerfile +++ b/ldvspec/Dockerfile @@ -14,7 +14,6 @@ RUN \ # collect the static files and make sure that the latest database migrations are done CMD \ - cd /src && \ python manage.py collectstatic --settings=ldvspec.settings.docker_sdc --noinput && \ python manage.py migrate --settings=ldvspec.settings.docker_sdc diff --git a/ldvspec/docker/docker-compose-dev-cd.yml b/ldvspec/docker/docker-compose-dev-cd.yml index 47580ae3..62232968 100644 --- a/ldvspec/docker/docker-compose-dev-cd.yml +++ b/ldvspec/docker/docker-compose-dev-cd.yml @@ -45,7 +45,9 @@ services: - ldv-spec-db env_file: - $HOME/shared/ldvspec.env - command: docker-entrypoint.sh + command: > + sh -c "python manage.py collectstatic --settings=ldvspec.settings.docker_sdc --noinput && + python manage.py migrate --settings=ldvspec.settings.docker_sdc" restart: always volumes: -- GitLab