From b203a62696811c55705184b1ad1123b347d0debf Mon Sep 17 00:00:00 2001 From: Lea Date: Mon, 14 Oct 2024 19:58:24 +0200 Subject: [PATCH] remove secret from app --- Dockerfile | 1 + app.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed5c3ca..4438bb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,5 +2,6 @@ FROM python:3.12-alpine COPY . /app WORKDIR /app RUN pip install -r requirements.txt +ENV FLASK_THERAPY_SECRET=${FLASK_THERAPY_SECRET} EXPOSE 5000 ENTRYPOINT ["gunicorn", "--config", "gunicorn_config.py", "app:app"] diff --git a/app.py b/app.py index 98ce25a..22024ef 100644 --- a/app.py +++ b/app.py @@ -6,7 +6,8 @@ from forms.SearchForm import SearchForm from arztapi.APIHandler import APIHandler app = Flask(__name__) -app.secret_key = "nosecretkey" +app.config.from_prefixed_env() +app.secret_key = app.config["THERAPY_SECRET"] locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')