simple deploys
random notes on doing a simple deploy for my own servers
cooked options
requirements
- cheap server
- caddy
- systemd/initd
New Server
- create a new user
- create ssh key
- lock down incoming access
- clone utils repo and run
make
ulimit -n unlimited
- run
deploy
- set up an A record for the domain
- create caddyfile (
/etc/caddy/Caddyfile
) - add service for caddy
Simplest
- push to git
- script checks for changes
- build binary
- swap into bin dir
- restart init.d service (make sure caddy holds requests)
.backup
for db backups on cron
Snippets
Example Caddyfile. Remove health related settings if not needed
avocadish.xyz {
encode gzip
reverse_proxy * localhost:9001
tls your@email.com
}
plants.avocadish.xyz {
encode gzip
reverse_proxy * localhost:9002
tls your@email.com
}
Resources
No downtime nginx PGSQL backup j3s deploys wesley deploys docker rollout