Choirrulloh / vps

Scripts used for installing/managing/restarting/monitoring processes on my server (and my server).

Home Page:https://sean.fish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vps

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 underlying supervisord/supervisorctl processes with my environment variables/configuration.
  • logs streams the logs from all applications
  • glogs lets me interact with the nginx logs
  • update_logs uses goaccess to visualize nginx logs
  • backup copies cache/token files to a tar.gz so they can be backed up. run every few hours w/ cron
  • generate_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 and F, which specify private (a non-autoindexed nginx listing) and public indexes.
  • shorten creates a shortened url using this
  • directories is a helper script sourced at the top of other scripts that defines common application location environment variables

Applications:

About

Scripts used for installing/managing/restarting/monitoring processes on my server (and my server).

https://sean.fish

License:MIT License


Languages

Language:Shell 100.0%