@sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.
You can see an example of how we do it in the quickstart plugin
I recently deployed my NodeBB in a docker container, and install the plugin locally by copying my plugin into node_modules directory.
When I started the NodeBB server, I got this message:
2023-01-24T08:59:05.922Z [4567/181] - warn: [plugins] "nodebb-plugin-my-plugin" is active but not installed.
This is my Dockerfile content:
FROM node:16.14.0 RUN mkdir -p /usr/src/app && chown -R node:node /usr/src/app WORKDIR /usr/src/app RUN apt-get install git ARG NODE_ENV ENV NODE_ENV $NODE_ENV COPY --chown=node:node install/package.json /usr/src/app/package.json USER node COPY --chown=node:node . /usr/src/app RUN npm install --only=prod && npm cache clean --force RUN git clone https://bitbucket.org/dev/nodebb-plugin-my-plugin.git RUN cp -r nodebb-plugin-my-plugin node_modules/ ENV NODE_ENV=production \ daemon=false \ silent=false EXPOSE 4567 USER root RUN chown root:root ./ -R CMD node ./nodebb activate nodebb-plugin-my-plugin; node ./nodebb build; node ./nodebb start -l
The plugin was successfully installed when I run it without docker container.
Please give me some suggestions. Thanks in advance.
Can you take a look at the runtime logs (sorry, I'm not fluent with Docker) and see what happens at the
CMD node ./nodebb activate nodebb-plugin-my-plugin; node ./nodebb build; node ./nodebb start -l step?
It sounds like maybe when
./nodebb start -l is run, NodeBB is doing another dependency install, which can happen if it detects some dependencies as out of date. That would effectively clobber your plugin that was copied into