Repository navigation
[Feature]: Create and remove workspaces through Laravel Herd 2 Workspaces #206
SimonBarrettACT
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Let a repository ask Polyscope to create each workspace through Laravel Herd 2's Workspaces feature, and remove it through Herd when the workspace is archived.
Why
Herd 2 can serve a copy of a site at its own domain, with its own certificate, PHP and Node isolation and, optionally, its own database. Today every Laravel/Herd team has to rebuild this with
herd link,herd secure,herd isolateand a matching archive script, and the Nginx side has gone wrong in #80 and #182. Letting Herd own the site and certificate would remove that class of problem.It would also help with cleanup. In my setup, Vite was left running after archive and kept recreating files in the deleted workspace folder, so I had to add a script to stop it. Teardown through Herd would give one place that knows what belongs to the workspace.
Suggested shape
An opt-in setting in
polyscope.json, for example"herd": { "workspaces": true }, so that creating a Polyscope workspace calls Herd to create the matching workspace, and archiving calls Herd to remove it.{{folder}}inpreview.urlwould then match the Herd domain. Setup scripts would keep handling anything app-specific, such as.envand per-workspace test databases.Notes
Polyscope makes clones rather than git worktrees, so Herd would need to accept an existing directory, or Polyscope would need to create the workspace through Herd and clone into it. I have not tested how Herd 2 Workspaces behave with Polyscope's layout.
All reactions