devops: deployment setup and docs
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m0s

This commit is contained in:
juancwu 2026-02-09 20:48:44 +00:00
commit 6e00b7387e
6 changed files with 491 additions and 3 deletions

27
docs/budgit.service Normal file
View file

@ -0,0 +1,27 @@
[Unit]
Description=Budgit web application
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=budgit
Group=budgit
WorkingDirectory=/opt/budgit
ExecStart=/opt/budgit/budgit
EnvironmentFile=/opt/budgit/.env
Restart=on-failure
RestartSec=5
# Graceful shutdown (matches the 10s timeout in main.go)
TimeoutStopSec=15
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/budgit
PrivateTmp=true
[Install]
WantedBy=multi-user.target