From a12dffefec7cbf8292a77b4d76788f02d7863cd7 Mon Sep 17 00:00:00 2001
From: Karel van Klink <karel.vanklink@geant.org>
Date: Tue, 24 Oct 2023 21:38:15 +0200
Subject: [PATCH] include TRANSLATIONS_DIR as environment variable in the
 Docker image

---
 Dockerfile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index e1ddb155..d00cbc51 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,6 +18,8 @@ EXPOSE 8080
 # The app reads the configuration from this location.
 # No need to set environment variables in your docker-compose.
 ENV OSS_PARAMS_FILENAME=/etc/gso/config.json
+# Set the environment variable for the translations directory
+ENV TRANSLATIONS_DIR=$(python3 -c "from os import path; import gso; print(path.join(path.split(gso.__file__)[0], 'translations'))" | tail -n 1)
 
 # Start the FastAPI application
 CMD ["uvicorn", "gso.main:app", "--host", "0.0.0.0", "--port", "8080"]
-- 
GitLab