Open radokristof opened 6 months ago
Hmm, plugins are stored in composer.plugins.json
As a work around, you could map that file into your container.
I agree, would be good to support this. It might make sense to generate composer.plugins.json from an env variable.
Yes, it would be great.
However, I don't think if just persisting composer.json
is usually enough.
Right now, for me socialiteproviders/saml2
requires additional commands to run inside the container:
docker exec librenms apk add php-xmlwriter
docker exec librenms chown librenms:librenms -R *
docker exec librenms lnms plugin:add socialiteproviders/saml2
docker exec librenms echo "SESSION_SECURE_COOKIE=true" >> .env
docker exec librenms echo "SESSION_SAME_SITE_COOKIE=none" >> .env
Add php-xmlwriter
package, as it is needed by saml2, change file ownership, as lnms
command will say that composer.json
is not writable, add plugin and then modify the .env.
I could also build a custom image, but usually I don't like that approach for such small changes like this. For the .env file, I did not find a solution how to make it persistent, and the docker envs does not allow to override all env variables.
Remember it is not composer.json, but composer.plugins.json ;)
Hmm, lnms
command just always says that the file ./composer.json
is not writable :)
Maybe it is just some ownership inconsistency problem with my install?
Hmm, maybe composer checks that it can write to composer.json even though it doesn't need to write to it in this case.
Support guidelines
I've found a bug and checked that ...
Description
If there is any added plugin added via
lnms plugin:add
, these will not persist between container recreations.Expected behaviour
All plugins should be available even after recreation
Actual behaviour
Plugins are missing, need to manually install them.
Steps to reproduce
lnms plugin:add socialiteproviders/saml2
Docker info
Docker Compose config
No response
Logs
Additional info
No response