Files
fleet/website
Allen Houchins 7d527ca23c Add quit and relaunch logic to macOS FMAs (#37670)
This pull request enhances the macOS app installation process by
improving how running applications are handled during install and
update, and also updates the metadata and scripts for Docker Desktop.
The main improvements are the introduction of quit/relaunch logic for
pkg-based FMAs, and the renaming and updating of Docker Desktop’s
identifiers and scripts.

**App install/relaunch improvements:**

* Added new shell functions `quit_and_track_application` and
`relaunch_application` to the generated install scripts. These functions
ensure that if an app (or pkg) is running before installation, it is
quit and then automatically relaunched after installation, preserving
user state. The logic tracks whether the app was running via an
environment variable.
[[1]](diffhunk://#diff-a9df2db484fcbb560d62c43f94c4bcc2d26dcf68066c9e7cc2bffad6f124ce97L22-R41)
[[2]](diffhunk://#diff-a9df2db484fcbb560d62c43f94c4bcc2d26dcf68066c9e7cc2bffad6f124ce97R53-R59)
[[3]](diffhunk://#diff-a9df2db484fcbb560d62c43f94c4bcc2d26dcf68066c9e7cc2bffad6f124ce97R72-R73)
[[4]](diffhunk://#diff-a9df2db484fcbb560d62c43f94c4bcc2d26dcf68066c9e7cc2bffad6f124ce97R571-R648)
* Removed the previous simpler `quit_application` logic from the install
script generation, as the new functions supersede it.

**Docker Desktop metadata and script updates:**

* Renamed the Docker Desktop input and updated its `slug` and
`unique_identifier` to match the new bundle identifier
(`com.electron.dockerdesktop`), reflecting the current packaging.
* Updated the output app metadata in `apps.json` to use the new slug and
unique identifier for Docker Desktop.
* Added a new output file for Docker Desktop
(`docker-desktop/darwin.json`) with the updated install and uninstall
scripts, including the new quit/relaunch logic and references.
2026-01-05 22:31:55 -06:00
..
2025-11-11 09:30:14 -05:00

fleetdm.com

This is where the code for the public https://fleetdm.com website lives.

Bugs

To report a bug or make a suggestion for the website, create an issue in the fleet GitHub repository.

Testing locally

See https://fleetdm.com/handbook/engineering#test-fleetdm-com-locally

Deploying the website

To deploy changes to the website to production, merge changes to the main branch. If the changes affect the website's code, or touch any files that the website relies on to build content, such as the query library, osquery schema, docs, handbook, articles, etc., then the website will be redeployed.

Wondering how this works? This is implemented in a GitHub action in this repo. Check out the code there to see how it works! For help understanding what sails run and npm run commands in there do, check the scripts in website/package.json and in website/scripts/.

Changing the database schema

To deploy new code to production that relies on changes to the database schema or other external systems (e.g. Stripe), first put the website in "maintenance mode" in Heroku. Then, make your changes in the database schema. Next, if you have a script to fix/migrate existing data, go ahead and run it now. (e.g. sails run fix-or-migrate-existing-data). Then, merge your changes and wait for the deploy to finish. Finally, switch off "maintenance mode" in Heroku.

Note that entering maintenance mode prevents visitors from using the website, so it should be used sparingly, and ideally at low-traffic times of day.

Warning: Doing an especially sensitive schema migration? There is a potential timing issue to consider, thanks to an infrastructure change that eliminated downtime during deploys by using Heroku's built-in support for hot-swapping. Read more in https://github.com/fleetdm/fleet/issues/6568#issuecomment-1211503881

Wiping the production database

I hope you know what you're doing. The "easiest" kind of database schema migration:

sails_datastores__default__url='REAL_DB_URI_HERE' sails run wipe

Then when you see the sailboat, hit CTRL+C to exit. All done!