mozilla

How to turn on the other plugins?


#1

I’m new to Docker and Talk. Got the demo of Talk running via Docker install, but how do I “turn on” the other plugins, I’m thinking the “Love and Like” buttons in the comments section. Thanks in advance.

Stone cold newbie.


#2

hi J!

All the instructions are here in our docs: https://docs.coralproject.net/talk/plugins/

Let us know how it goes with Talk!

Andrew


#3

Thanks Andrew,

For clarification, since theres no TALK_PLUGINS_JSON env variable by default, do I just create it and point it to the plugins.json?

I installed Talk via Docker/Docker-Compose btw. -Johnathan


#4

Hi @jhardingmmfa!

You can manage plugins either via the env file OR with a plugins.json. We recommend using a plugins.json file.

If the plugins.json file exists, it will override the plugins.default.json.

Start there and let us know if you have more questions!
Kim


#5

Thanks Kim,

Here’s my plugins.json file with the like and love plugins added last.
I restarted my coralproject/talk container and still don’t see the like or love buttons…

/usr/src/app # cat plugins.json
/*
I created this to add the love and like plugin
*/

{
“server”: [
“talk-plugin-auth”,
“talk-plugin-featured-comments”,
“talk-plugin-respect”,
“talk-plugin-love”,
“talk-plugin-like”

],
“client”: [
“talk-plugin-auth”,
“talk-plugin-author-menu”,
“talk-plugin-featured-comments”,
“talk-plugin-flag-details”,
“talk-plugin-ignore-user”,
“talk-plugin-member-since”,
“talk-plugin-moderation-actions”,
“talk-plugin-permalink”,
“talk-plugin-respect”,
“talk-plugin-sort-most-replied”,
“talk-plugin-sort-most-respected”,
“talk-plugin-sort-newest”,
“talk-plugin-sort-oldest”,
“talk-plugin-viewing-options”,
“talk-plugin-love”,
“talk-plugin-like”

]
}

Is there another file I should edit?


#6

Did you re-run yarn and re-build?


#7

Can you send a link to your site?


#8

Since these pages are a local dev environment, there’s no link to send. Question. The “respect” plugin works “out of the box”. I can see all the other plugins in /usr/src/app/plugins so I get I’m looking for a command to turn on the “like” and “love” plugin.

Here’s a screenshot of the comment page (attached). You see the Respect button displays (and works).


#9

Hey, I notice the environmental variable I created yesterday for TALK_PLUGINS_JSON has disappeared…

/usr/src/app # printenv
NODE_VERSION=8.11.1
YARN_VERSION=1.5.1
TALK_MONGO_URL=mongodb://mongo/talk
HOSTNAME=0b720cf37c8d
SHLVL=1
HOME=/root
TERM=xterm
REVISION_HASH=XXXXXXXX…blah, blah…
PATH=/usr/src/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
TALK_ROOT_URL=http://127.0.0.1:3000
PWD=/usr/src/app
TALK_REDIS_URL=redis://redis
TALK_PORT=3000
TALK_JWT_SECRET=password
NODE_ENV=development
/usr/src/app #

Let me recreate and try again…


#10

No you won’t need that env variable.

What you need to do is rebuild so it will know to use plugins.json.

Are you using a docker compose file?


#11

Yes! Docker-compose.


#12

Great!

Run these commands:

docker-compose pull

docker-compose down

docker-compose up -d


#13

Cool. Stand by…:sunglasses:


#14

Ok. Done. Its just not loading the Talk comment section.


#15

You’ll have to wait a few minutes for it to come back up


#16

I see, So I got a brand new image, but not the one where I made the changes. So I have to re-create the plugins.json, add the “like, love” plugins to it and UPLOAD the image to github, then PULL it back down?

or wait?


#17

Here’s my current plugins.default.json file, it has all the “out of the box” stuff. Looks like I have to recreate a plugins.json with the additional plugins I want to turn on…

/usr/src/app # cat plugins.default.json
{
“server”: [
“talk-plugin-auth”,
“talk-plugin-featured-comments”,
“talk-plugin-respect”,
“talk-plugin-profile-data”
],
“client”: [
“talk-plugin-auth”,
“talk-plugin-author-menu”,
“talk-plugin-featured-comments”,
“talk-plugin-flag-details”,
“talk-plugin-ignore-user”,
“talk-plugin-member-since”,
“talk-plugin-moderation-actions”,
“talk-plugin-permalink”,
“talk-plugin-respect”,
“talk-plugin-sort-most-replied”,
“talk-plugin-sort-most-respected”,
“talk-plugin-sort-newest”,
“talk-plugin-sort-oldest”,
“talk-plugin-viewing-options”,
“talk-plugin-profile-data”
]
}
/usr/src/app #


#18

It shouldn’t have deleted the image…

Can you post your docker-compose.yml?

And post output from docker ps


#19

Ok, Here’s the compose.yml

cat docker-compose.yml

For details on the syntax of docker-compose.yml files, check out:

https://docs.docker.com/compose/compose-file/compose-file-v2/

version: ‘2’
services:
talk:
image: coralproject/talk:latest
restart: always
ports:
- “3000:3000”
depends_on:
- mongo
- redis
environment:
- NODE_ENV=development # remove this line in production
- TALK_MONGO_URL=mongodb://mongo/talk
- TALK_REDIS_URL=redis://redis

- TALK_ROOT_URL=http://127.0.0.1:3000

  - TALK_ROOT_URL=http://localhost/drupalsites.com
  - TALK_PORT=3000
  - TALK_JWT_SECRET=password

mongo:
image: mongo:latest
restart: always
volumes:
- mongo:/data/db
redis:
image: redis:latest
restart: always
volumes:
- redis:/data
volumes:
mongo:
external: false
redis:
external: false

and heres’ the processes running…


#20

I’m stumped, those commands should have just restarted your containers… not overwritten them. I’ll have to get input from my team and get back to you.


Looking for Help with Talk Plugin Google Auth