Skip to content
Snippets Groups Projects
Commit 56b9da6c authored by Jan Hartig's avatar Jan Hartig
Browse files

Merge branch 'dev' into 'main'

Add healthcheck

See merge request !5
parents c74db80b b8d801a3
No related branches found
No related tags found
1 merge request!5Add healthcheck
Pipeline #26053 passed
...@@ -51,6 +51,9 @@ RUN pip install --upgrade pip && \ ...@@ -51,6 +51,9 @@ RUN pip install --upgrade pip && \
# define the port number the container should expose # define the port number the container should expose
EXPOSE 8000 EXPOSE 8000
HEALTHCHECK --interval=10s --timeout=3s \
CMD curl -s -o /dev/null -f http://localhost:8000/health || exit 1
# upload folder # upload folder
VOLUME /opt/app/uploads VOLUME /opt/app/uploads
......
...@@ -73,7 +73,7 @@ def upload(language: str): ...@@ -73,7 +73,7 @@ def upload(language: str):
return process_file() return process_file()
else: else:
if form.email.data: if form.email.data:
form.email.data = form.email.data[:-len(current_app.config["MAIL_DOMAIN"])] form.email.data = form.email.data[: -len(current_app.config["MAIL_DOMAIN"])]
if language != current_app.config["DEFAULT_LANGUAGE"]: if language != current_app.config["DEFAULT_LANGUAGE"]:
form.email.label.text = current_app.config["LOCALISATIONS"]["email"]["label"][language] form.email.label.text = current_app.config["LOCALISATIONS"]["email"]["label"][language]
...@@ -94,3 +94,8 @@ def set_language(language): ...@@ -94,3 +94,8 @@ def set_language(language):
abort(404) abort(404)
request.language = language request.language = language
@current_app.route("/health")
def health():
return "", 204
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment