From 3a6de9ff761b0b5da6ada0e14ba8262e2c92e791 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 1 Apr 2022 00:22:24 +0200 Subject: [PATCH] fix path of SQLITE_URL for Django (postorius + web docker-image) Startup of images using SQLite database fails as of non-existent database file. Fix this by using the proper syntax [1] to have the database created at /opt/mailman-web-data/mailmanweb.db 1 - https://github.com/joke2k/django-environ/issues/187#issuecomment-400577114 Signed-off-by: Sven Roederer --- postorius/docker-entrypoint.sh | 2 +- web/docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postorius/docker-entrypoint.sh b/postorius/docker-entrypoint.sh index 26c7e38..3327d16 100755 --- a/postorius/docker-entrypoint.sh +++ b/postorius/docker-entrypoint.sh @@ -77,7 +77,7 @@ fi if [[ ! -v DATABASE_URL ]]; then echo "DATABASE_URL is not defined. Using sqlite database..." - export DATABASE_URL=sqlite://mailmanweb.db + export DATABASE_URL=sqlite:////opt/mail-web-data/mailmanweb.db export DATABASE_TYPE='sqlite' fi diff --git a/web/docker-entrypoint.sh b/web/docker-entrypoint.sh index a02691c..0f74f9f 100755 --- a/web/docker-entrypoint.sh +++ b/web/docker-entrypoint.sh @@ -77,7 +77,7 @@ fi if [[ ! -v DATABASE_URL ]]; then echo "DATABASE_URL is not defined. Using sqlite database..." - export DATABASE_URL=sqlite://mailmanweb.db + export DATABASE_URL=sqlite:////opt/mail-web-data/mailmanweb.db export DATABASE_TYPE='sqlite' fi