Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
783c4533
Commit
783c4533
authored
1 year ago
by
Erwan Rouchet
Committed by
Bastien Abadie
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add Docker healthcheck
parent
132b9d52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2094
Add Docker healthcheck
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+5
-1
5 additions, 1 deletion
Dockerfile
Dockerfile.binary
+4
-0
4 additions, 0 deletions
Dockerfile.binary
with
9 additions
and
1 deletion
Dockerfile
+
5
−
1
View file @
783c4533
# syntax=docker/dockerfile:1
FROM
registry.gitlab.teklia.com/arkindex/backend/base:gitlab-teklia
as
build
RUN
mkdir
build
...
...
@@ -41,7 +42,10 @@ RUN chown -R ark:teklia /backend_static
# Copy Version file
COPY
VERSION /etc/arkindex.version
# Run with Daphne
HEALTHCHECK
--start-period=1m --start-interval=1s --interval=1m --timeout=5s \
CMD wget --spider --quiet http://localhost/api/v1/public-key/ || exit 1
# Run with Gunicorn
ENV
PORT 80
EXPOSE
80
CMD
["manage.py", "gunicorn", "--host=0.0.0.0"]
This diff is collapsed.
Click to expand it.
Dockerfile.binary
+
4
−
0
View file @
783c4533
# syntax=docker/dockerfile:1
FROM python:3.10-slim-bookworm AS compilation
RUN apt-get update && apt-get install --no-install-recommends -y build-essential wget
...
...
@@ -87,6 +88,9 @@ COPY arkindex/documents/export/*.sql /usr/share/arkindex/documents/export/
# Otherwise Django will not load the compiled module
RUN for cmd in $(cat /usr/share/arkindex/commands.txt); do mkdir -p $(dirname $cmd); touch $cmd; done
HEALTHCHECK --start-period=1m --start-interval=1s --interval=1m --timeout=5s \
CMD wget --spider --quiet http://localhost/api/v1/public-key/ || exit 1
# Run gunicorn server
ENV PORT=80
EXPOSE 80
...
...
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