15 Commits

Author SHA1 Message Date
Mike Dalessio 3286fbb50e require_relative doesn't work as expected in ERB templates
e.g., when firing up bin/minio-setup this looks in the parent
directory

However, we shouldn't need it since `lib` is eager loaded.
2025-11-28 13:39:47 -05:00
Jorge Manrubia 197090f754 Move active storage config to gem 2025-11-28 15:53:58 +01:00
Mike Dalessio 44f1d19f9a Configure beta to use production blob store 2025-11-24 14:25:14 -05:00
Mike Dalessio 6ebb572964 Remove tenant format specifier from Disk storage config 2025-11-24 13:45:23 -05:00
Mike Dalessio ffc0c86f36 Minio support in development
for when we need to debug direct upload problems
2025-10-14 19:11:50 -04:00
Mike Dalessio 9126c42eef Remove the "mirror" storage service
because we've updated all the blobs to point to "purestorage"
2025-06-01 13:04:30 -04:00
Mike Dalessio a43db94a83 Update production storage to write to the Pure blob store
Modify the blob copying script to update the blob service name.

This completes the migration and allows us to (at some point) clean up
local disk and remove the "mirror" service from the config.
2025-06-01 12:57:54 -04:00
Mike Dalessio 6d7fbd2175 Clean up the purestorage config, and add explanatory comments.
We're keeping beta on local disk for now.
2025-06-01 12:48:59 -04:00
Mike Dalessio bddfed3419 Flip the storage mirror to write to Pure as the primary 2025-05-31 16:02:50 -04:00
Mike Dalessio 704e215eca Production mirrors Active Storage to :purestorage
Also include a script to copy existing blobs to Pure.

Local is still the primary.

Beta will keep using local disk service for Active Storage because I
think there are constraints on source IPs for the Pure cluster.
2025-05-31 14:37:35 -04:00
Jorge Manrubia 723e6d94f5 Rename bubbles => cards 2025-04-09 14:50:58 +02: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
Jose Farias d556e21287 Use House for MD comments 2024-11-27 18:59:15 -06:00
Kevin McConnell 564a0f48ae New Rails app 2024-06-21 13:19:56 +01:00