This repo demonstrates how to send slack messages through nginx if a webhook (eg. from git-sync) is received. To achieve this, OpenResty, a nginx distribution with lua at its heart, is used.
For nginx configuration, you can put different form of configurations files on different locations dependent on your use cases.
- If you only need the
server
context directives, you can put the config files inside the/etc/nginx/conf.d/<anyname>.conf
- If you need a ground-up change on nginx config, you have to create a brand-new nginx.conf file on
/usr/local/openresty/nginx/conf/nginx.conf
(may vary on different linux distro).
To build the OpenResty docker image on DEBUG mode on stdout
docker build . -t nginx-test --build-arg RESTY_RPM_FLAVOR="-debug"
docker run --rm --name mycontainer -p 8000:80 nginx-test
If you need to update your full nginx conf, you can look at full folder
if you need to add just a portion of nginx conf (eg. the server context), you can look at server-context