300dffd376a806291fab285a39896dc53cfaa938
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.
Fizzy
Setting up for development
First get everything installed and configured with:
bin/setup
And then run the development server:
bin/dev
You'll be able to access the app in development at http://localhost:3006.
Deploying
Fizzy is deployed with Kamal. You'll need to have the 1Password CLI set up in order to access the secrets that are used when deploying. Provided you have that, it should be as simple as bin/kamal deploy to the correct environment.
For beta:
bin/kamal deploy -d beta
And for production:
bin/kamal deploy -d production
Description
Languages
Ruby
67.8%
HTML
14.6%
CSS
10.8%
JavaScript
5.6%
Shell
0.9%
Other
0.3%