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')