Skip to content

Commit 96f6aee

Browse files
authored
🔧(backend) Allow overwriting the data directory (#893)
## Purpose Deployments that don't rely on Docker should be given the option to use a different data directory. ## Proposal Allow customization of the `DATA_DIR` through an environment variable of the same name. If the environment variable is not set the behaviour remains the same as before. Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
1 parent 9465f1a commit 96f6aee

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to
1818
- 🚩 add homepage feature flag #861
1919
- ✨(settings) Allow configuring PKCE for the SSO #886
2020
- 🌐(i18n) activate chinese and spanish languages #884
21+
- 🔧(backend) allow overwriting the data directory #893
2122

2223
## Changed
2324

src/backend/impress/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# Build paths inside the project like this: BASE_DIR / 'subdir'.
2525
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
26-
DATA_DIR = os.path.join("/", "data")
26+
DATA_DIR = os.getenv("DATA_DIR", os.path.join("/", "data"))
2727

2828

2929
def get_release():

0 commit comments

Comments
 (0)