From 8f9bc5f761287fb3c54b96de37b454053a6e9083 Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Thu, 10 Jul 2025 10:15:13 +0200 Subject: [PATCH] docs(docker): add healthcheck to documentation (#1748) * docs(docker): add healthcheck to documentation Signed-off-by: Ludovic Ortega * fix: update docker cli healthcheck --------- Signed-off-by: Ludovic Ortega --- docs/getting-started/docker.mdx | 48 ++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/docs/getting-started/docker.mdx b/docs/getting-started/docker.mdx index cac469513..d71e3a19d 100644 --- a/docs/getting-started/docker.mdx +++ b/docs/getting-started/docker.mdx @@ -33,20 +33,31 @@ docker run -d \ --name jellyseerr \ -e LOG_LEVEL=debug \ -e TZ=Asia/Tashkent \ - -e PORT=5055 `#optional` \ + -e PORT=5055 \ -p 5055:5055 \ -v /path/to/appdata/config:/app/config \ --restart unless-stopped \ fallenbagel/jellyseerr ``` +The argument `-e PORT=5055` is optional. + +If you want to add a healthcheck to the above command, you can add the following flags : +``` + --health-cmd "wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1" \ + --health-start-period 20s \ + --health-timeout 3s \ + --health-interval 15s \ + --health-retries 3 \ +``` + To run the container as a specific user/group, you may optionally add `--user=[ user | user:group | uid | uid:gid | user:gid | uid:group ]` to the above command. #### Updating: Stop and remove the existing container: ```bash -docker stop jellyseerr && docker rm Jellyseerr +docker stop jellyseerr && docker rm jellyseerr ``` Pull the latest image: ```bash @@ -83,6 +94,12 @@ services: - 5055:5055 volumes: - /path/to/appdata/config:/app/config + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1 + start_period: 20s + timeout: 3s + interval: 15s + retries: 3 restart: unless-stopped ``` @@ -137,7 +154,26 @@ Then, create and start the Jellyseerr container: ```bash -docker run -d --name jellyseerr -e LOG_LEVEL=debug -e TZ=Asia/Tashkent -p 5055:5055 -v "jellyseerr-data:/app/config" --restart unless-stopped fallenbagel/jellyseerr:latest +docker run -d \ + --name jellyseerr \ + -e LOG_LEVEL=debug \ + -e TZ=Asia/Tashkent \ + -e PORT=5055 \ + -p 5055:5055 \ + -v jellyseerr-data:/app/config \ + --restart unless-stopped \ + fallenbagel/jellyseerr +``` + +The argument `-e PORT=5055` is optional. + +If you want to add a healthcheck to the above command, you can add the following flags : +``` + --health-cmd "wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1" \ + --health-start-period 20s \ + --health-timeout 3s \ + --health-interval 15s \ + --health-retries 3 \ ``` #### Updating: @@ -165,6 +201,12 @@ services: - 5055:5055 volumes: - jellyseerr-data:/app/config + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1 + start_period: 20s + timeout: 3s + interval: 15s + retries: 3 restart: unless-stopped volumes: