jamesvandyne / tanzawa

Tanzawa is a blogging system designed for the IndieWeb that focuses on sustainability.
Apache License 2.0
32 stars 2 forks source link

Plugins refactor #300

Closed jamesvandyne closed 1 year ago

jamesvandyne commented 1 year ago

This PR fixes a couple of different issues:

  1. Adds a custom database wrapper to workaround an incompatibility between Django 4.2 and Spatailite 5.
  2. Re-imagines plugins

What do I mean by re-imagining plugins? Initially plugins were designed around a Wordpress-style plugin interface. Drag a python module to a directory on your VPS, refresh the page, and click enable. Tanzawa would then restart the process and run migrations on start up so users wouldn't need to manually do anything with the database.

This isn't possible in the new reality of running Tanzawa on fly.io beause there's instances of the app running on multiple servers and restarting the parent process on one doesn't restart them all.

As such this PR will embrace fly.io and move all migrations to be running on deploy. As a bonus, this will allow us to remove a lot of the complexity / hacks in the plugin system. Instead of having active / deactivate links, we will include the commands to run them instead.