rpei2022 commented on issue #6743:
URL: https://github.com/apache/apisix/issues/6743#issuecomment-1129528359

   @tokers @tzssangglass  
   
   **The following is part of the content of docker-compose.yml, I put custom 
plugin files in ./plugins directory, and mount it to the directory 
/opt/third/apisix/plugins int the container.**
   services:
     apisix:
       image: apache/apisix:2.13.1
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         **- ./plugins:/opt/third/apisix/plugins**
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
         - ./apisix_conf/nginx.conf:/usr/local/apisix/conf/nginx.conf:rw
   The following is part of the content of conf/nginx.conf, after I manually 
added the /opt/third/?.lua in the front of the lua_package_path, my custom 
plugins could be loaded successfully, otherwise, my custom plugin could not be 
loaded.
   http {
       # put extra_lua_path in front of the builtin path
       # so user can override the source code
       lua_package_path  
"**/opt/third/?.lua**;$prefix/deps/share/lua/5.1/?.lua;$prefix/deps/share/lua/5.1/?/init.lua;/usr/local/apisix/?.lua;/usr/local/apisix/?/init.lua;;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua;";
       lua_package_cpath 
"$prefix/deps/lib64/lua/5.1/?.so;$prefix/deps/lib/lua/5.1/?.so;;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;";
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to