Skip to content
/ vps Public

Scripts used for installing/managing/restarting/monitoring processes on my server. Other misc scripts (mediaproxy/remsync) that provide FTP/Proxy like functionality.

License

Notifications You must be signed in to change notification settings

purarue/vps

Repository files navigation

vps

Scripts used for installing/managing/restarting/monitoring processes on 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.

jobs includes jobs for bgproc (specifically, bgproc_on_machine) related to interacting with the server

bin includes scripts that are run on my machine or on the server

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

  • vps_backup copies cache/token files to a tar.gz so they can be backed up. runs with bgproc. backup_server is run from my computer, which ssh's into the server to run that. Runs once per day, in housekeeping

  • vps_deploy and deploy are a basic ssh/git pull/restart/view logs script for projects which I deploy frequently

  • vps_generate_static_sites builds my static websites and places them in ~/static_files.

  • remsync is a script that's 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 two endpoints, f and p, which specify private (a non-autoindexed nginx listing) and public indexes.

  • playlist interfaces with my playlist manager. It allows me to select multiple playlists, combines all the files from those playlists into a single mp3 and syncs that up to my server with remsync. Often run this on my machine before I leave my house; I then listen to the file on my phone by going to corresponding URL.

  • mediaproxy to ssh into the server, youtube-dl/ffmpeg something and host it on a readable link. Has video/audio wrapper that use more of my personal scripts to prompt me to to select format codes, (similar to mpvf). That way, I can press a keybind, which grabs the URL from my clipboard and re-hosts it on my server.

  • shorten creates a shortened url using no-db-shorturl

  • approve-comments approves comments for my guest book at https://purarue.xyz

  • mnu runs the periodic job to update the google sheet

  • 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. Other misc scripts (mediaproxy/remsync) that provide FTP/Proxy like functionality.

Topics

Resources

License

Stars

Watchers

Forks

Languages