Deployment Architecture

July 07, 2017

I now have a scraper that works and a static website built with Hugo.

Putting these together, I need to re-deploy the static website each day with updated inventory, which the scraper provides.

So my single VPS instance will run a daily cronjob script that:

  1. scrapes the inventory.
  2. stores it in the database.
  3. git pulls the website from Gitlab.
  4. pulls updated inventory from database.
  5. inserts updated inventory into website.
  6. pushes website back to Gitlab, which triggers Netlify to rebuild site.

Item 3 onwards, I need to make a call whether to keep writing modules in the main package or write separate scripts for each. Maybe a separate module for handling site (re)building…

I'll tell you when I post stuff.

Subscribe to get my latest posts by email.