APIcast icon indicating copy to clipboard operation
APIcast copied to clipboard

[native] APIcast executable can't be started from directory other than apicast root

Open mayorova opened this issue 6 years ago • 5 comments

When using native APIcast installation, bin/apicast works fine if started from the APIcast root directory (e.g. the checked out local git repo copy). However, if it's started from a different location, the Lua libraries can't be found.

It seems to be partly an issue with apicast that refers to the current directory instead of inferring the absolute path to lua_modules, and partly lua-rover that also sets up a relative path.

In APIcast Docker image it all works fine though, you can start apicast from anywhere. So, I am not sure what the actual cause of the issue is.

mayorova avatar Jun 22 '18 16:06 mayorova

Would be good to post steps to reproduce. Ideally as a Dockerfile, so we can verify it was fixed.

mikz avatar Jun 26 '18 08:06 mikz

@mikz Would this work? https://gist.github.com/mayorova/9d396e52780a637d6894018b7ec8f648

mayorova avatar Jun 28 '18 10:06 mayorova

@mayorova I don't know. Does it work?

BTW good finding that OpenResty provides older packages: https://openresty.org/package/centos/7/x86_64/ Means we can install old OpenResty when new ones are released.

mikz avatar Jun 28 '18 10:06 mikz

@mikz Well, you were looking the steps to reproduce :) Here they are. When apicast -h is started from the root APIcast directory, it works, but when it's called from another location, the dependencies can't be resolved.

mayorova avatar Jun 28 '18 10:06 mayorova

@mayorova as steps to reproduce that works great, thanks!

mikz avatar Jun 28 '18 10:06 mikz