packages.wenpai.net/deploy/ansible/roles/wppackages/templates/wppackages.socket.j2
Ben Word e276195b6e
Implement socket-activated zero-downtime deploy switchover (#67)
Systemd socket activation keeps the listening socket open across
service restarts so connections queue at the kernel instead of
getting 503s from Caddy. The Go server detects LISTEN_FDS and
uses the inherited fd, falling back to normal listen for local dev.
Caddy retry window bumped as a safety net.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 14:07:54 -05:00

9 lines
130 B
Django/Jinja

[Unit]
Description=WP Packages Socket
[Socket]
ListenStream={{ go_listen_addr }}
NoDelay=true
[Install]
WantedBy=sockets.target