lapis
lapis copied to clipboard
OSX: can not find suitable server installation
I'm attempting to setup lapis for the first time but I'm running into an issue with lapis' server dependancies. Specifically I'm getting the typical "can not find suitable server installation" when running the lapis command which prevents me from running lapis server
.
I installed openresty through homebrew
mylesbarros$ which openresty
/usr/local/bin/openresty
I've also tried installing nginx directly and setting up a symlink directly in /usr/local
out of desperation to no avail.
Where is lapis looking for openresty and what can I do to get it to recognize my installation?
Lapis looks in the following:
"/usr/local/openresty/nginx/sbin/"
"/usr/local/opt/openresty/bin/"
"/usr/sbin/"
"" (this one represents your PATH)
I have to be missing something obvious as, even using the export command to add openresty to my PATH, lapis still isn't able to identify the server.
Is there a manual for setting lapis up that might help clarify the issue?
Other than the one I linked to, I do not know. I'd say read that entire page (and maybe the homepage of Lapis) carefully to see that you aren't missing a step.
Got it working!
For anyone that has experienced a similar issue I uninstalled the Homebrew install of openresty and instead built it from source and installed it via make.
Haven't the slightest suggestion as to why the Homebrew install was incompatible with lapis.
Glad you got it working. ^^ I'd like to add that from my (admittedly limited) experience, that seems to be the best way to go about it.
Thanks, and thanks for the input!
There's definitely a reason that you default to it, I should probably pick up the habit.
What path does homebrew install to? Maybe I can add it to one of the default search paths
@leafo homebrew installs everything to its own directory and symlinks it all into /usr/local/bin
by default.
Also the easy way to install it on any os — Docker I used this image https://hub.docker.com/r/erikcw/lapis/ and it was like 1-2-3
So, it seems that lapis is only looking for a binary w/ the name nginx
. The default homebrew openresty version (from denji/homebrew-nginx) puts openresty in /usr/local/opt/openresty. But, the binary is only named openresty
, not nginx
.
ln -s /usr/local/opt/openresty/bin/openresty /usr/local/opt/openresty/bin/nginx
Allows lapis to boot the server.
@cycomachead
You can use the LAPIS_OPENRESTY environment varibale to set the location of the openresty binary, but the symbolic link approach works too.
https://github.com/leafo/lapis/blob/master/lapis/cmd/nginx.moon#L91
Ah, thanks!
Do you think it's worth looking for / using binaries named openresty
? That'd make the default mac OS install easier.