From b89b0c5d3a2367c1c670c8ee6962f2a253b80a09 Mon Sep 17 00:00:00 2001 From: Kirill Mokevnin Date: Sun, 15 Nov 2026 20:30:02 -0500 Subject: [PATCH] docs(self-hosting): give docker run 40 seconds to stop A shutdown takes up to 30 seconds, the time sphericon needs to hand its running jobs back to the queue, and Docker kills a container 10 seconds after the stop signal by default. Co-Authored-By: Claude Opus 5.5 --- src/content/docs/docs/self-hosting.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/docs/docs/self-hosting.md b/src/content/docs/docs/self-hosting.md index c70791c..b0eec5a 100644 --- a/src/content/docs/docs/self-hosting.md +++ b/src/content/docs/docs/self-hosting.md @@ -66,7 +66,7 @@ You already have PostgreSQL somewhere. 2. Run the image, which migrates the database on start: ```sh - docker run -d --name sphericon -p 3000:3000 \ + docker run -d --name sphericon -p 3000:3000 --stop-timeout 40 \ -e SPHERICON_ENV=production \ -e SPHERICON_DATABASE_URL="postgres://user:pass@db:5432/sphericon?sslmode=require" \ -e SPHERICON_JWT_SECRET="" \ @@ -76,6 +76,10 @@ You already have PostgreSQL somewhere. ghcr.io/getsphericon/sphericon:latest ``` + `--stop-timeout 40` gives sphericon time to hand its running jobs back to the queue on a stop: + Docker kills a container 10 seconds after the stop signal by default, and a shutdown takes up to + 30. The `compose.yaml` above and the Helm chart set the same 40 seconds. + 3. Put a [reverse proxy with HTTPS](#https-and-reverse-proxy) in front of port 3000. 4. Go to [First run](#first-run).