-
Notifications
You must be signed in to change notification settings - Fork 170
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
template nginx configuration with liquid #449
Conversation
4240fe8
to
b9f3d68
Compare
b72fec1
to
2e6a051
Compare
apicast/Roverfile.lock
Outdated
busted 2.0.rc12-1 | ||
dkjson 2.5-2 | ||
inspect 3.1.0-1 | ||
ldoc 1.4.6-2 | ||
liquid scm-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to work around this before luarocks/luarocks#739 is fixed. Probably by doing the whole clone and copy in rover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by 3scale/lua-rover#2
8c7ed2b
to
a62e0ee
Compare
lua-resty-http 0.11-0| | ||
lua-resty-iputils 0.3.0-1| | ||
lua-resty-jwt 0.1.11-0| | ||
lua-resty-repl 0.0.6-0|3878f41b7e8f97b1c96919db19dbee9496569dda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the hash in this one? It has a version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but version can still point to a scm to get the source. Depends if it is a rock or a rockspec.
rock has a source packaged in the bundle but rockspec has to download it from somewhere
in this case repl has only rockspec and that points to a git tag https://luarocks.org/modules/saksmlz/lua-resty-repl/0.0.6-0
@@ -0,0 +1,92 @@ | |||
env REDIS_HOST; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is apicast/conf/nginx.conf
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of settings present in the original config but not on this template:
lua_max_running_timers 2048;
lua_socket_pool_size 512;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha! they probably lost during the rebase, good catch!
the plain nginx.conf should not be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed both (removed the old file and added those missing directives).
* we need to use some templating to customize nginx directives not accessible from Lua code (like buffer sizes, etc.) * using liquid templating language * introduce `bin/cli` that is a main entrypoint to: - configure paths to load local code and dependencies - execute lua cli code * `bin/apicast` is now slim perl wrapper to setup paths, because it has access to current working folder and ritch stdlib for working with filesystem and env variables * introduce concept of an environment, so each can have own config, like rails * use latest rover and lock scm dependencies 3scale/lua-rover#2 update changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Replace bash script with a proper Lua CLI and template the nginx configuration by liquid.
This wouldn't be possible without awesome liquid interpreter https://github.com/chenxianyu2015/liquid-lua. Thanks.
Before
bin/apicast -h
After
bin/apicast -h