Commit Graph

8 Commits

Author SHA1 Message Date
Mike Dalessio ea56968c05 Remove "primary_original" database
which was created to perform the tenanting migration from 300dffd3,
and can now be cleaned up.
2025-04-23 15:39:50 -04:00
Kevin McConnell 91df76928b Add fizzy-app-102 as a replica
The setup here is a bit rough while we settle some of the details, but
the gist of it is:

- Define accessories to run the primary/replica processes
- Add a web-replica role, which is similar to web but has the
  replication-side accessory
- Load the beamer extension on the app's primary tenanted database

Note that we aren't sending any traffic into the replica yet, but it
would be functional to do so. This stage is mainly about testing the
database replication.
2025-04-16 17:46:44 +01:00
Mike Dalessio 300dffd376 Script and configuration for a multi-tenant migration
ref: https://3.basecamp.com/2914079/buckets/37331921/messages/8422006338

The script takes advantage of the fact that we can bind to the
existing untenanted database by adding it explicitly (and temporarily)
as a readonly shard to the database.yml, and so in the script
with_original_db is connected to the original database.

storage/tenants/%{tenant}/ is now the root directory for all
state stored for a particular tenant, including active storage and the
database.

We leave the existing files and production database in place after the
migration, in case we need to roll back (by reverting the code and
config).

We also don't do a granular active storage blob copy, since the
attachments are mostly on Account (and not on Bubble). Instead we
hardlink the blobs on disk (so we don't take up additional space with
duplicates).

Finally, we're manually adding the kamal-proxy hosts to the deploy
file, so that we can generate letsencrypt certs for the
subdomains. This is only intended to be a short-term solution, we'll
want something like a wildcard cert before we go live.
2025-03-12 07:53:31 -04:00
Mike Dalessio d9ece38753 Make the application multi-tenant 2025-03-12 07:53:31 -04:00
Kevin McConnell 90538afb3b Add Solid Queue
We'll run jobs via the Puma plugin for now, to simplify the deployment.
2025-01-08 14:02:45 +00:00
Kevin McConnell 2e892e0766 Add Solid Cache 2025-01-08 14:02:45 +00:00
Kevin McConnell 648e9b2296 Add solid_cable 2025-01-03 16:29:43 +00:00
Kevin McConnell 564a0f48ae New Rails app 2024-06-21 13:19:56 +01:00