Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ptb-subtitle-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Hartig
ptb-subtitle-service
Commits
b8d801a3
Commit
b8d801a3
authored
1 year ago
by
Jan Hartig
Browse files
Options
Downloads
Patches
Plain Diff
Add healthcheck
parent
e3868b24
No related branches found
No related tags found
1 merge request
!5
Add healthcheck
Pipeline
#26003
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+3
-0
3 additions, 0 deletions
Dockerfile
routes.py
+6
-1
6 additions, 1 deletion
routes.py
with
9 additions
and
1 deletion
Dockerfile
+
3
−
0
View file @
b8d801a3
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
routes.py
+
6
−
1
View file @
b8d801a3
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment