Zero Downtime deployment for different app version - Taymindis/nginx-link-function GitHub Wiki
1. Located your built program .so application, if you have no any idea of this, please refer to this Sample Application
2. Assumed that your application called "myApp-1.0.0.so" which located at "/etc/nginx/apps/myApp-1.0.0.so", then go to nginx and add one the content below
server {
listen 8888;
...
ngx_link_func_lib "/etc/nginx/apps/myApp-1.0.0.so";
...
...
location = /testCFunGreeting {
# if not variable specified, direct write response out
ngx_link_func_call "my_app_simple_get_greeting";
}
}
3. Then start the nginx.
4. Somehow you have built new version of your application, then you named it as "myApp-2.0.0.so" which you stored it at "/etc/nginx/apps/myApp-2.0.0.so", then please go to nginx and change the content below
from ngx_link_func_lib "/etc/nginx/apps/myApp-1.0.0.so"; to ngx_link_func_lib "/etc/nginx/apps/myApp-2.0.0.so";