Scripts used for installing/managing/restarting/monitoring processes on my server (and my server).
Uses supervisord to manage processes.
My fork of superhooks notifies me in discord whenever one of my processes dies, as does netdata if there are any outliers in the hundreds of metrics it takes.
- Puts application code into
~/code
- Centralizes logs in
~/logs
This runs on an Debian server, but it should be OS agnostic. vps_install
will throw a fatal error before starting if I'm missing any required commands. My server runs nginx
, lots of the log based commands assume that.
See here for a blog post describing how I set up this server.
vps_install
clones and sets up environments for each application. Checks that you have corresponding commands/packages installed and that required credential/files are in the right location, installs virtual environments/packages for each application.super
lets me interact with the underlyingsupervisord
/supervisorctl
processes with my environment variables/configuration.logs
streams the logs from all applicationsglogs
lets me interact with the nginx logsupdate_logs
uses goaccess to visualize nginx logsbackup
copies cache/token files to a tar.gz so they can be backed up. run every few hours w/ crongenerate_static_sites
builds my static websites and places them in/var/www/html
.remsync
is a script thats run on my machine, which rsyncs files from a local directory to the server. That directory is served with nginx, so I can sync something to the server from my CLI and send someone a link. example output. Has to endpoints,f
andF
, which specify private (a non-autoindexed nginx listing) and public indexes.shorten
creates a shortened url using thisdirectories
is a helper script sourced at the top of other scripts that defines common application location environment variables
- https://gitlab.com/seanbreckenridge/glue
- https://github.com/seanbreckenridge/mal-id-cache
- https://gitlab.com/seanbreckenridge/mal-notify-bot
- https://gitlab.com/seanbreckenridge/discord-countdown-bot
- https://gitlab.com/seanbreckenridge/mal-unapproved
- https://gitlab.com/seanbreckenridge/docker-jikan
- https://gitlab.com/seanbreckenridge/wca_userinfo
- https://gitlab.com/seanbreckenridge/albums (server)
- https://gitlab.com/seanbreckenridge/todotxt_deadline_notify
- https://gitlab.com/seanbreckenridge/xqc-dvd
- https://gitlab.com/seanbreckenridge/xkcd-favorites
- https://gitlab.com/seanbreckenridge/animeshorts
- https://gitlab.com/seanbreckenridge/subpath-serve
- https://gitlab.com/seanbreckenridge/no-db-static-shorturl