The discussion revolves around automating the Discourse installation process using the discourse-setup script. drmrbrewer seeks to automate the script, noting that it currently requires manual input. pfaffman explains that input can be piped into the script, and shares that they use a here-document (<<EOF) to feed responses, noting that delays are no longer necessary due to a prior change. Remah clarifies that this method is input redirection, not a pipe, and distinguishes between redirection (using < or >) and piping (using |).
I’m following the steps in the install guide and it works just fine. Now I’m considering how I can automate this process (as part of a script run when spinning up a new server).
When it comes to running ./discourse-setup some manual input is presently required. Is it possible to pass arguments to this script in some way, or via an env var somehow, so that it can be run as part of a server init script?
You can pipe the input in to discourse-setup. That’s what my install script does. A year or so ago I changed the bit that creates the swap to have a delay rather than require an extra return so that the input that discourse-setup needs is always the same.