devops: deployment setup and docs
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m0s
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m0s
This commit is contained in:
parent
c28c3a22e0
commit
6e00b7387e
6 changed files with 491 additions and 3 deletions
27
docs/budgit.service
Normal file
27
docs/budgit.service
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue