Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
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
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
64e8a469
Unverified
Commit
64e8a469
authored
4 years ago
by
Christopher May-Townsend
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add healthcheck for default localhost 8008 port on /health endpoint. (#8147)
parent
3f8f96be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/8147.docker
+1
-0
1 addition, 0 deletions
changelog.d/8147.docker
docker/Dockerfile
+4
-0
4 additions, 0 deletions
docker/Dockerfile
docker/README.md
+29
-0
29 additions, 0 deletions
docker/README.md
with
34 additions
and
0 deletions
changelog.d/8147.docker
0 → 100644
+
1
−
0
View file @
64e8a469
Added curl for healthcheck support and readme updates for the change. Contributed by @maquis196.
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
4
−
0
View file @
64e8a469
...
@@ -55,6 +55,7 @@ RUN pip install --prefix="/install" --no-warn-script-location \
...
@@ -55,6 +55,7 @@ RUN pip install --prefix="/install" --no-warn-script-location \
FROM
docker.io/python:${PYTHON_VERSION}-slim
FROM
docker.io/python:${PYTHON_VERSION}-slim
RUN
apt-get update
&&
apt-get
install
-y
\
RUN
apt-get update
&&
apt-get
install
-y
\
curl
\
libpq5
\
libpq5
\
xmlsec1
\
xmlsec1
\
gosu
\
gosu
\
...
@@ -69,3 +70,6 @@ VOLUME ["/data"]
...
@@ -69,3 +70,6 @@ VOLUME ["/data"]
EXPOSE
8008/tcp 8009/tcp 8448/tcp
EXPOSE
8008/tcp 8009/tcp 8448/tcp
ENTRYPOINT
["/start.py"]
ENTRYPOINT
["/start.py"]
HEALTHCHECK
--interval=1m --timeout=5s \
CMD curl -fSs http://localhost:8008/health || exit 1
This diff is collapsed.
Click to expand it.
docker/README.md
+
29
−
0
View file @
64e8a469
...
@@ -162,3 +162,32 @@ docker build -t matrixdotorg/synapse -f docker/Dockerfile .
...
@@ -162,3 +162,32 @@ docker build -t matrixdotorg/synapse -f docker/Dockerfile .
You can choose to build a different docker image by changing the value of the
`-f`
flag to
You can choose to build a different docker image by changing the value of the
`-f`
flag to
point to another Dockerfile.
point to another Dockerfile.
## Disabling the healthcheck
If you are using a non-standard port or tls inside docker you can disable the healthcheck
whilst running the above
`docker run`
commands.
```
--no-healthcheck
```
## Setting custom healthcheck on docker run
If you wish to point the healthcheck at a different port with docker command, add the following
```
--health-cmd 'curl -fSs http://localhost:1234/health'
```
## Setting the healthcheck in docker-compose file
You can add the following to set a custom healthcheck in a docker compose file.
You will need version >2.1 for this to work.
```
healthcheck:
test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"]
interval: 1m
timeout: 10s
retries: 3
```
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