From b5bc2804426ce1ace3b87dbdd5ad9e703a1c4884 Mon Sep 17 00:00:00 2001 From: Bobby Date: Tue, 14 Nov 2023 22:24:49 -0500 Subject: Update Dockerfile and Read DB from ENV --- Dockerfile | 2 ++ thatcomputerscientist/settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 880eb583..0709f0f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,8 @@ ARG REDIS_PASSWORD=${REDIS_PASSWORD} ENV REDIS_PASSWORD=${REDIS_PASSWORD} ARG REDIS_PORT=${REDIS_PORT} ENV REDIS_PORT=${REDIS_PORT} +ARG DB_DATABASE=${SQLITE_DB_NAME} +ENV DB_DATABASE=${SQLITE_DB_NAME} RUN mkdir -p /shifoo diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py index 1ca6b2df..673464e5 100644 --- a/thatcomputerscientist/settings.py +++ b/thatcomputerscientist/settings.py @@ -157,7 +157,7 @@ CHANNEL_LAYERS = { DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + 'NAME': os.path.join(BASE_DIR, os.environ.get('SQLITE_DB_NAME')), } } -- cgit v1.2.3