Open Decipher opened 3 years ago
I'm not quite sure how we could make this work, Lagoon projects are very much tied to git repositories. So you essentially have to push the code, then trigger a deployment.
The way the Netlify CLI works is the contents of a build directory are sent into netlify, based on an application ID. If the application is set to require review, it will return a preview URL, otherwise the content will be deployed.
In the case of Lagoon, I would see something like this being an option:
In the case of Lagoon, I would see something like this being an option:
- Files sent somewhere against application
- Deployment, that is tied to a repository, is triggered
- Build step injects files into container
Lagoon doesn't have a files staging area to send files to though, the only thing that comes close is if the environment that is deployed has a persistent volume attached, then you can sync the files into that persistent volume (as pod restarts do not impact a persistent volume).
Triggering a build on the environment could then be done, but really there is no way for a Lagoon build to reach into that persistent volume except in pre or post rollout tasks as these are run within a running pod. Where this comes unstuck is at the actual container image build phase, as it has no way to pull files from a persistent volume, it just isn't designed for this.
So really, you'd be better off with an nginx deployed with a persistent volume that has the root
as the persistent volume, and then you just rsync your static file assets into the persistent volume. No reason to do a deployment at all then?
If I've completely misunderstood the actual feature request though, let me know.
I opened this issue as requested in Slack as an aside, it's not something I'm invested in because it's not something I would do.
The main reason I wouldn't do it is because it's already incredibly easy to use the Netlify CLI tool to create and deploy a statically generated site, and it's free to do so.
Lagoon isn't really meant for that workflow. But that doesn't mean it isn't possible to improve support for SSG based deployments.
Is your feature request related to a problem? Please describe. As a user I would like a Publish command so I could deploy statically generated sites to Lagoon from command line.
Describe the solution you'd like Add a Publish command. The publish command should:
Describe alternatives you've considered Build the static site on Lagoon
Additional context The Netlify CLI is a good example.