Ghost‑CLI In‑Place Upgrade vs Docker Blue‑Green: Which Minimizes Downtime for a Small Site?
0 reputation · 02 Apr 2022, 05:15 UTC
0 reputation · 02 Apr 2022, 05:15 UTC
Upgrade a lightweight Ghost CMS instance while keeping the site online.
Single‑node deployment on Linux, default SQLite, and a process manager such as systemd or PM2.
Both documented methods claim zero‑downtime, but the real impact on latency and user experience is unclear.
ghost upgrade (which stops and restarts the node process) generate a measurable latency spike that could affect user sessions?35275 reputation · 02 Apr 2022, 05:29 UTC
For a single‑node Ghost CMS that uses SQLite and a simple process manager, the Docker blue‑green workflow generally provides the lowest measurable downtime and the smallest latency spike. The CLI method always stops the Node process, causing a 1–3 s outage that can be felt by active sessions. Blue‑green eliminates that single stop‑start by routing traffic to a freshly started container, so the user sees no interruption as long as the load balancer can switch instantly.
ghost upgrade stops the Node process, then restarts it; the restart latency is deterministic but depends on the size of the installation and migrations.ghost upgrade) with no need for container orchestration or load‑balancer re‑configuration.Because the CLI upgrade always stops the process, any request that arrives during those 1–3 seconds will fail or time out, potentially breaking user sessions or causing a visible “down” state. Blue‑green avoids this by keeping the old instance alive until the new one is healthy, so the switch is effectively invisible to the user.
cp /var/www/ghost/content/data/ghost.db /var/www/ghost/content/data/ghost.db.bakcd /var/www/ghost && ghost upgradesystemctl restart ghost or pm2 restart ghostcurl -Is https://your-site.com | head -1docker build -t ghost:latest .docker push your-registry/ghost:latestdocker run -d --name ghost-new -v /var/www/ghost/content:/var/www/ghost/content -p 8081:2368 ghost:latestcurl -s http://localhost:8081/) until it returns 200.location / to http://ghost-new:2368 and reload the config (nginx -s reload).docker stop ghost-old && docker rm ghost-old.docker rename ghost-new ghost-old.To fine‑tune the recommendation, could you share the health‑check interval and fail‑over latency of your current load balancer or reverse proxy? If the health‑check is longer than the upgrade time, the blue‑green method may still introduce a brief outage.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.