Commit Graph

120 Commits

Author SHA1 Message Date
Jason Zimdars 28a569c49b Tickets 2025-03-17 21:24:08 -05:00
Mike Dalessio e08f073d73 Structured logs for controller actions now contain the tenant 2025-03-13 17:21:31 -04:00
Kevin McConnell eabcc1d477 Use Docker Hub for deployments 2025-03-13 15:19:00 +00:00
Mike Dalessio 482aa90243 logging: suppress unstructured log lines 2025-03-13 09:46:14 -04:00
Mike Dalessio ed92687f4c logging: revert changes 2025-03-13 09:41:31 -04:00
Mike Dalessio 019a27787c logging: try just setting log level 2025-03-13 09:38:54 -04:00
Mike Dalessio 3c2e7b8ae3 logging: suppress log entries that are not structured
Borrowed from the BC4 configuration.
2025-03-13 09:31:11 -04:00
Mike Dalessio 31bbb6c76f deploy: keeping beta to one tenant 2025-03-12 12:14:53 -04:00
Mike Dalessio a337294650 deploy: update beta hosts for multi-tenancy 2025-03-12 11:56:58 -04:00
Mike Dalessio bb5ed28130 kamal-proxy: add fizzy.37signals.com so we can return 404
instead of the TLD handshake error now seen
2025-03-12 08:29:40 -04:00
Mike Dalessio d8075b74b7 hack: to handle tenantname.fizzy.37signals.com
Let's do the needful thing for now, and clean it up once the gem has
exposed the tenant resolver as a config in a cleaner way.
2025-03-12 07:53:31 -04: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 ca77968e55 Work around Rails' shard swapping lock in the Solid Cache config
Because solid cache started using shard swapping when given a
`database:` key in https://github.com/rails/solid_cache/pull/219, and
Rails doesn't distinguish which database is being swapped and which
was locked.

Hopefully I can make a change upstream that will enable swap locking
only for a specific databases. Until then, let's just use a slightly
more verbose configuration to work around it.
2025-03-12 07:53:31 -04:00
Mike Dalessio d9ece38753 Make the application multi-tenant 2025-03-12 07:53:31 -04:00
Mike Dalessio 232e5e4ed2 lint: tell brakeman 7 to ignore the class eval in has_markdown 2025-03-10 12:56:36 -04:00
Mike Dalessio 9c26633673 Inject the GITHUB_TOKEN secret into the container builder 2025-03-10 12:32:32 -04:00
Mike Dalessio 989600c590 Configure structured JSON logging
This configuration is emulating what we do in HEY.
2025-03-10 12:12:56 -04:00
Kevin McConnell a802b8de5a Allow managing bucket subscriptions 2025-02-26 10:53:03 +00:00
Kevin McConnell 694783e5f3 Allow toggling watch preference
We use a true/false preference so we can tell the difference between
disabling the watch vs never having the watch. This is so we can toggle
off and on the preferences for a container (like the bucket) without
losing any bubble-specific preferences.
2025-02-26 10:53:03 +00:00
Jason Zimdars 530b6e4a90 Stub notifications settings screen 2025-02-21 17:25:44 -06:00
Jason Zimdars 28bdc531b0 Mark individual notifications as read 2025-02-21 16:39:50 -06:00
Jason Zimdars 000bd158eb Reactions on comments 2025-02-18 17:08:56 -06:00
Kevin McConnell 6b457fc26f Add job to auto-pop the items that are due 2025-02-12 13:22:31 +00:00
Kevin McConnell bd4e475d44 Remove old abandoned bubble creations via cron 2025-02-11 14:34:39 +00:00
Kevin McConnell bb5c767111 Recover recently-deleted bubbles 2025-02-11 14:34:39 +00:00
Jason Zimdars 9f2e1df9bf Add favicon, app icons, and simple PWA manifest 2025-02-10 12:57:49 -06:00
Kevin McConnell 8b17a33a75 Only run Solid Queue in Puma in dev
In production, we have extra containers for it.
2025-02-10 17:55:46 +00:00
Jason Zimdars 9b7d297027 Add rudimentary support for embedding videos 2025-01-30 16:47:42 -06:00
Jason Zimdars 441c68b8d7 Add data-turbo-frame attribute to links in comments 2025-01-30 15:20:40 -06:00
Kevin McConnell 4c63f88620 Merge pull request #206 from basecamp/latest-activity
Latest activity
2025-01-28 17:43:06 +00:00
Kevin McConnell cc1051c968 Expire upload links after 5 minutes
By default the Active Storage URLs are valid for 5 minutes. We should
avoid caching the responses for longer than that.
2025-01-28 16:13:26 +00:00
Kevin McConnell ed17bc28ab Make active storage blobs cacheable 2025-01-28 11:45:33 +00:00
Jason Zimdars a847a71a57 Merge branch 'main' into latest-activity
* main:
  Undo weird flash notices
  Redirect to bucket after deleting
  Fix layout issues in Safari
  Should match text
  Add production deploy config
  Add Kamal deploy config
  Remove old deploy config
2025-01-27 17:11:27 -06:00
Kevin McConnell 2681d76e12 Allow all hosts in development, for testing 2025-01-27 14:16:41 +00:00
Kevin McConnell 014a297717 Add production deploy config 2025-01-27 13:30:48 +00:00
Kevin McConnell 890c754f85 Add Kamal deploy config 2025-01-27 13:02:55 +00:00
Kevin McConnell f02b75e76b Remove old deploy config 2025-01-27 09:02:51 +00:00
Jason Zimdars 881e1d07fc Merge branch 'main' into latest-activity
* main: (27 commits)
  Leave some space for the tray
  Let's not assume it's a due date
  Avoid overlap
  Let's try without the big drag button, extend beyond the column a touch
  Tighten labels
  Match notification dot
  Spacing
  Add more context
  Avoid leaving the tray open
  This shouldn't be here
  Paginate the read notifications
  Add a test case
  Split up a big view
  Allow filtering by stage
  Send beacon request on disconnect as well
  Wire up notifications "Mark all as read" button
  Add unread dot
  Set state for when there are no new notifications
  Move to right side, smooth transition
  Open tray on click, stub mark-as-read button
  ...
2025-01-24 15:07:17 -06:00
Kevin McConnell 5d5dc8fb73 Wire up notifications "Mark all as read" button 2025-01-21 14:37:41 +00:00
Kevin McConnell 6706802b89 Add an index view for all notifications 2025-01-16 17:48:38 +00:00
Kevin McConnell c4f50fa634 Move notifications to tray controller 2025-01-16 17:48:38 +00:00
Jason Zimdars 410cc95396 Stub out basic design 2025-01-15 17:16:59 -06:00
Kevin McConnell cd1e6378d0 Add drafted and published states 2025-01-15 10:58:00 +00:00
Kevin McConnell bab5bc718d Rename deployment targets 2025-01-15 10:57:27 +00:00
Kevin McConnell 46989f6ebe Mark notification read when viewing the Bubble 2025-01-13 14:21:47 +00:00
Kevin McConnell 10c7b61af9 Split up a long line for clarity 2025-01-13 14:21:47 +00:00
Kevin McConnell fd1789ed58 Mark notifications read when clicked on 2025-01-13 14:21:47 +00:00
Kevin McConnell 8a51597408 Add direct linking to comments 2025-01-13 14:21:47 +00:00
Kevin McConnell 952895ae67 WIP: show notifications in a tray 2025-01-13 14:21:47 +00: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