Mattermost Peer-to-Peer Forum

Automatically activate plugin


#1

We run mattermost in docker using docker compose. All the settings are variables.

The first setting gets polulated correctly adn uploads are enabled.
- MM_PLUGINSETTINGS_ENABLEUPLOADS=true

Enabling the plugin does not work.
-MM_PLUGINSETTINGS_PLUGINSTATES_COM.GITHUB.MATTERPOLL.MATTERPOLL_ENABLE=true

Any help appreciated.


#2

Hi @larvel,

Can you help share more details on your environment from here as this will help us diagnose the issue: https://docs.mattermost.com/process/support.html#general-questions-for-any-issues? Also any relevant config settings and log errors will be helpful.

Based on the information you provided, it looks like you are attempting to use the Matterpoll plugin? If yes, I also encourage you to join our Matterpoll channel and ping Hanzei for any questions (he is the maintainer of the Matterpoll plugin).


#3

Could not paste our docker-compose here, so: https://pastebin.com/RF6VkZGY

This works, except for automatically enabling the plugin upon restart


#4

Thanks @larvel, what error messages are you getting when trying to enable the plugin?


#5

Sorry for the late response.

The only error seen is this.
{“level”:“error”,“ts”:1543919177.7169154,“caller”:“app/plugin_requests.go:33”,“msg”:“Access to route for non-existent plugin”,“missing_p
lugin_id”:“com.github.matterpoll.matterpoll”,“error”:“plugin not found: com.github.matterpoll.matterpoll”}

I have not datestamp, so its hard to know what caused this and when it happened.

The plugin works fine, the only issue we have is automatically enabling it.


#6

Hi @larvel,

One of our community members mentioned that you’ll need to replace . s with _ s in the name of the environment variable.

Let me know if this helps,


#7

Thanks for the suggestion. If you see my pastebin, that is one of the things we have tried:

https://pastebin.com/RF6VkZGY


#8

Hi @larvel, would you be open to joining our Matterpoll channel and pinging Hanzei (he is the maintainer of the Matterpoll plugin)?


#9

Hi,

I did reach out to @Hanzei. We agreed that this is not a problem with the plugin itself, but rather a general one.
How would you activate a plugin using environment variables?

Here is what we have tried: (in docker-compose.yml)
- MM_PLUGINSETTINGS_PLUGINS: |
“com.github.matterpoll.matterpoll”: {
“Enable”: true
}
- MM_PLUGINSETTINGS_PLUGINSTATES="{“com.github.matterpoll.matterpoll”:{“Enable”:true}}"

  - MM_PLUGINSETTINGS_PLUGINSTATES_COM.GITHUB.MATTERPOLL.MATTERPOLL_ENABLE=true
  - MM_PLUGINSETTINGS_PLUGINSTATES_COM_GITHUB_MATTERPOLL_MATTERPOLL_ENABLE=true

#10

The formatting was not good. What you see is four different attempts to try and set the plugin as activated upon start.