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).