Commit Graph

77 Commits

Author SHA1 Message Date
Mike Dalessio e70047ca0f Default development environment to app.fizzy.localhost (#2822)
Using fizzy.localhost causes CORS errors when using minio for Active
Storage because the minio endpoint is at minio.fizzy.localhost — a
sibling subdomain, not a subdomain of the app host. Switching to
app.fizzy.localhost makes both hosts subdomains of fizzy.localhost,
resolving the CORS issue. See #2814 for the related minio CORS fix.

fizzy.localhost will continue to work if people want to use it, but all
docs and scripts have been updated to point to app.fizzy.localhost.
2026-04-09 12:43:01 -04:00
Mike Dalessio 45d165749f Fix CORS issues when using minio in development (#2814)
Move MinIO from minio.localhost to minio.fizzy.localhost, which makes
it same-site with the app, so the CORS redirect succeeds.

The service worker fetches Active Storage URLs with `mode: "cors"` so
it can inspect response sizes for offline caching. Active Storage's
redirect controller returns a 302 to the MinIO presigned URL. When
that redirect crosses site boundaries (from fizzy.localhost to
minio.localhost), the browser sets the Origin header to "null" on the
redirected request per the Fetch spec, which fails the CORS check and
produces net::ERR_FAILED.
2026-04-08 16:06:38 -04:00
Kevin McConnell 108337e823 Cache public pages for 5 mins, not 1 year
Given these may be cached in CDNs, and they aren't versioned, a shorter
expiration time makes it practical to change them.
2026-01-28 14:30:43 +00:00
Jeremy Daer d913ef5b6a Fix that caching should be disabled in dev by default. References 3cf841d463. 2026-01-08 12:26:18 -08:00
Dmytro Shteflyuk 0417639049 Restore log level configurability in production environment 2026-01-07 11:24:22 -05:00
Jay Ohms ea43d81850 Support mobile app local development access from devices over nip.io 2026-01-05 09:31:27 -05:00
Kevin McConnell 50691ae385 Merge pull request #2205 from basecamp/base-url-env
Add `BASE_URL` environment variable
2025-12-19 14:58:08 +00:00
Mike Dalessio 28250b340c Move the :fatal log setting into the SaaS config
This should only be set if the app is using the
rails-structured-logging gem, which means it should only be set in the
SAAS config. I think this is just something we missed in one of the
decoupling exercises we did.
2025-12-19 09:09:40 -05:00
Kevin McConnell 407f2a3a6a Add BASE_URL environment variable
When running a Docker deployment, we need a way to set the app's base
URL. Otherwise links in emails, or generated in jobs etc., can not be
correctly constructed.
2025-12-19 12:21:37 +00:00
Jeremy Daer 97ffe00672 My life for a trailing comma 2025-12-16 09:54:04 -08:00
Jeremy Daer a68bd2775d Fix Tailscale host match. Rails wraps the regexp in its own anchors and port-match. 2025-12-16 09:35:26 -08:00
nu-wa 472dbeee8c SMTP: support SMTPS on port 465 (#2132)
* Add more configuration options for the SMTP connection

* Add SMTP_TLS option for implicit TLS connections

For SMTPS servers (typically port 465), set SMTP_TLS=true.
Port auto-defaults to 465 when TLS is enabled, 587 otherwise.
STARTTLS is used by default and automatically disabled when TLS is on.

Fixes boolean conversion bug in original PR (string "false" is truthy)
and removes insecure default for certificate verification.

---------

Co-authored-by: Jeremy Daer <jeremy@37signals.com>
2025-12-13 10:57:08 -08:00
Jeremy Daer 82626f020d Tailscale serve support (#2126)
Ensure we can serve the app from multiple hosts without breaking links.
* Switch unnecessary full URLs to paths
* Drop default host/port URL options for controllers

Shell 1
```bash
bin/dev
```

Shell 2
```bash
tailscale serve http://fizzy.localhost:3006
```
2025-12-13 09:29:50 -08:00
Mike Dalessio 7d6cf62665 CSP config to allow Minio in development 2025-12-12 17:00:17 -05:00
Kevin McConnell 154a3d79ee Add DSIABLE_SSL env option
`assume_ssl` and `force_ssl` are often used together:

- When running behind a terminating proxy (including Thruster) you'll
  want both.
- When running without SSL (like on localhost) you'll want neither.

To simplify setup for those cases, we add the `DISABLE_SSL` option. When
set to `true` all SSL-related behaviour is turned off. When left as the
default, it's on.

We can still use `ASSUME_SSL` and `FORCE_SSL` to set those separately
if required.
2025-12-11 16:11:18 +00:00
Kevin McConnell 06bfe2c982 Scope the config option
Also use a `configure` block to set it up.
2025-12-11 11:28:32 +00:00
Kevin McConnell 0e443d3602 Use initializer to configure tenant mode 2025-12-11 11:20:43 +00:00
Kevin McConnell 2a3fda02f4 Merge pull request #1939 from hosmelq/active-storage-env-config
Make Active Storage service configurable
2025-12-10 14:36:47 +00:00
Kevin McConnell a5396bbb1a Don't overwrite storage service from engine 2025-12-10 14:08:08 +00:00
Kevin McConnell 99bee0e0e0 Make SMTP config conditional on SMTP_ADDRESS
- If `SMTP_ADDRESS` is set, configure Action Mailer to use it, along
  with additional optional SMTP-related settings.
- Otherwise, don't set config (for compatibility with engines like
  fizzy-saas).
- Remove sendmail env setup, since by default there is no sendmail in
  the container, and custom deployment can use whatever config the want
  directly. If we end up needing this, we can bring it back via its
  own env.
2025-12-09 12:44:36 +00:00
Adam Haris 9de59ca37b default to smtp 2025-12-09 11:54:45 +00:00
Adam Haris 1d5654cafa configurable actionmailer settings (ENV) 2025-12-09 11:54:44 +00:00
Hosmel Quintana ac1f935d53 Update config/environments/production.rb
Co-authored-by: Alex Ghiculescu <alex@tanda.co>
2025-12-08 18:33:27 -06:00
Hosmel Quintana b3bc0bb2ff allow configuring Active Storage service and add AWS S3 definition 2025-12-08 18:33:27 -06:00
Lewis Buckley 50be611f01 Allow configuring SSL in production with ENV vars 2025-12-08 20:57:01 +00:00
Kevin McConnell 04153038f0 Document deployment
- Update the README with detailed information about how to deploy a
  Fizzy instance
- Reduce the example deploy config
- Add example SMTP configuration in production.rb
2025-12-05 17:03:07 +00:00
Jorge Manrubia 081586c0a6 This was moved to the engine
https://github.com/basecamp/fizzy-saas/commit/27d4d34091de8db53bb01ac604c56e1a83b3adc3
2025-11-29 21:46:34 +01:00
Jorge Manrubia 486d56d24f Move env-specific config bits to the saas gem 2025-11-29 16:19:30 +01:00
Jorge Manrubia c61dba0641 Format 2025-11-28 15:53:58 +01:00
Jorge Manrubia fa9ee0381d Move more settings to the gem 2025-11-28 15:53:58 +01:00
Jorge Manrubia 18e1badfb5 Prevent choking when no structured logging for now 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
Kevin McConnell 436caa8f74 Revert "Logging tweaks"
Debug logging interferes with the structured logging, so let's take that
back out.
2025-11-17 09:12:41 -05:00
Kevin McConnell 47f481525b Logging tweaks
- Enable debug logging
- Disable health check logs
- Set Solid Queue logger
2025-11-17 09:12:41 -05:00
Mike Dalessio aca00d6218 Configure a reading: connection for solid gems
because I'm getting exceptions from Mission Control
2025-11-17 09:12:41 -05:00
Kevin McConnell 915c1202f8 Initial minimal primary/replica switching 2025-11-17 09:11:57 -05:00
Jorge Manrubia 8a07782e0f Enable public file server for assets
Attempt to deal with https://app.fizzy.do/5986089/cards/2790
2025-11-07 13:13:24 +01:00
Fernando Álvarez 514c0f45a2 Migrate to fizzy.do 2025-11-04 13:17:10 +01:00
Stanko K.R. 79b012f319 Add Join Codes 2025-10-31 16:24:30 +01:00
Fernando Álvarez 7f78514a58 Move to app.box-car.com 2025-10-30 11:12:39 +01:00
Fernando Álvarez 3946733b65 Migrate to box-car.com 2025-10-28 18:44:25 +01: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
Stanko K.R. d3816bc212 Create testbed to test beamer scenarios in Fizzy 2025-10-13 13:46:00 +02:00
Mike Dalessio bf04f4f12d Configure action_controller.default_url_options
so that using url helpers will work in turbo stream notifications sent
by background jobs.

ref: https://fizzy.37signals.com/5986089/collections/2/cards/1469
2025-09-01 11:19:26 -04:00
Jorge Manrubia 4427524e53 We do need the host! 2025-08-28 17:55:12 +02:00
Jorge Manrubia 9ba9a5758b Remove hosts for now
Docker subnets causing trouble and this is not really part of the email change
2025-08-28 17:21:15 +02:00
Jorge Manrubia cd6ff41eea Fix port for local dev 2025-08-27 11:21:11 +02:00
Jorge Manrubia 218519d075 Configure letter opener 2025-08-26 10:21:13 +02:00
Jorge Manrubia b911a12833 Configure action mailer 2025-08-26 10:15:27 +02:00
Mike Dalessio e67d59e341 Introduce a staging environment
ref: https://3.basecamp.com/2914079/buckets/21350690/card_tables/cards/8708868711
2025-06-04 11:06:09 -04:00