Open danielledeleo opened 1 month ago
I am a huge fan of having GH releases that offer a static compiled binary. I think if we can settle on a path forward for our CLI we can offer a CLI binary that will deploy docker containers of NGINX Unit into a user's environment, and even configure them automatically.
Then we dont have to tell users to curl scripts into their shell, but can still offer a really fast self-serve experience.
Current friction points when running Unit inside of Docker: Control socket requires running curl inside the container (or restarting the container to pick up modified config file) unitc handles this problem in a clever way Users must manually compose images to get certain combinations of modules to work (PHP+Python+Wasm, e.g.) We used to provide -full images to get around this. Users have to get their application code into the container (usually a Docker --mount)
Can I ask when we stopped providing the full images and why? I figure a CLI could automatically mount a user's application project directory at time of deployment.
Part of improving the first touch experience. (See #137)
The NGINX Unit home page should prominently feature an easy way to get started with Unit.
Summary: we need a script that installs a CLI to control Unit and Unit itself. Our current scripts and guides are not suited to a one-liner.
Inspiration
rustup.rs offers a particularly spartan way to get going.
Several ideas have been floated so far in private discussions in Unit team as to the best way to go from zero to serving requests with Unit.
Docker
Many production deployments of Unit use Docker, and it also happens to be a relatively simple way to get Unit onto developers' computers. We already have a fairly in-depth guide to running Unit in Docker, but it's not simple enough as is to be put on the home page as a one liner.
Current friction points when running Unit inside of Docker:
unitc
handles this problem in a clever way-full
images to get around this.What this could look like today
Questions:
curl ... | sh
one-liner? Is that helpful?Personally, I don't think the above image presents a great first touch experience, and I'd be thrown off if all that happened from a shell piped script.
Local install
These options could be displayed intelligently on the home page by reading the client user agent.
On macOS with Homebrew, we already have a very good one-liner:
On Linux (including WSL), we have our existing
setup-unit
script:What's missing is a reasonable way to run something in Unit quickly.
Proposed Solution
What this script should do is out of scope for this issue. See (todo: link to CLI issue)