Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Publish command #192

Open
Decipher opened this issue Aug 30, 2021 · 4 comments
Open

feat: add Publish command #192

Decipher opened this issue Aug 30, 2021 · 4 comments
Labels
discussion Have a discussion about something

Comments

@Decipher
Copy link

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:

  • Publish the current or provided directory to a linked project
  • Provide a wizard to link the codebase to a project if no existing ID is found

Describe alternatives you've considered
Build the static site on Lagoon

Additional context
The Netlify CLI is a good example.

@shreddedbacon
Copy link
Member

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.

@shreddedbacon shreddedbacon added the discussion Have a discussion about something label Aug 30, 2021
@Decipher
Copy link
Author

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:

  1. Files sent somewhere against application
  2. Deployment, that is tied to a repository, is triggered
  3. Build step injects files into container

@shreddedbacon
Copy link
Member

In the case of Lagoon, I would see something like this being an option:

  1. Files sent somewhere against application
  2. Deployment, that is tied to a repository, is triggered
  3. 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.

@Decipher
Copy link
Author

Decipher commented Sep 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Have a discussion about something
Projects
None yet
Development

No branches or pull requests

2 participants