Future updates to the website
So in order to make this website better I need to clearly define what is running on the VPS and how deploys work.
Code is stored in github, on commit to
master, a GH Action will ssh into my VPS using stored creds.
The GH Action runner will then run
build.sh from this repo.
build.sh will pull the latest github version, build it locally, and replace the version hosted by nginx at
That process is very simple.
311 Alert Suite
I have a cronjob running:
*/1 * * * * bash /home/james/BOS311-alert-suite/run_all.sh that runs a script that runs my python script for many different peoples locations, and sends SMS messages to them.
I would need to containerize this, but I use a twilio API key that I must keep secret.
The following pages use Brython
- 311 Proximity Boston
- 311 Proximity Cambridge
- Gutenberg Unwrap
- Corrlinks Textsplit
The Brython pages have their own libs in the
~/james_blog/static folder, I use the
brython CLI tool to generate them. I do this because to include the full python stdlib with brython was a large file.
What I should do though, is just point to a brython mirror of these files externally, and purge them from my repo. They are large binary files and do not belong in git.
311 Proximity Search Page
For the 311 search page there are two cronjobs:
*/5 * * * * python3 /home/james/scripts/cache_311.py */5 * * * * python3 /home/james/scripts/cache_CambridgeMA_311.py
These scripts call the 311 API, and update files:
I am not sure how to handle dockerizing this, will need to probably share a volume or something with the caching scripts?