Litestream's -exec wrapper prevents the Go binary from receiving socket file descriptors, blocking future socket activation for zero-downtime deploys. Running Litestream as an independent service also gives cleaner restart semantics — app deploys no longer restart replication unnecessarily. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 lines
350 B
Django/Jinja
16 lines
350 B
Django/Jinja
[Unit]
|
|
Description=Litestream replication for WP Packages
|
|
After=network.target
|
|
Before=wppackages.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=deploy
|
|
Group=www-data
|
|
ExecStart=/usr/bin/litestream replicate -config {{ app_root }}/shared/litestream.yml
|
|
Restart=always
|
|
RestartSec=1s
|
|
EnvironmentFile={{ app_root }}/shared/.env
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|