RocketChat / rocketchat_nextcloud

App that allows Rocket Chat to live inside NextCloud and become seamless for the NextCloud Users
28 stars 2 forks source link

Docker installation and CREATE_TOKENS_FOR_USERS #15

Closed brendan-pike closed 2 years ago

brendan-pike commented 2 years ago

I'm new to docker but installed rocketchat via docker as it was recommended. It's been a learning curve, seems the default mongo image version is deprecated so learning to upgrade that was fun. So its all running well but I need to include the "CREATE_TOKENS_FOR_USERS=true" but am having trouble achieving this.

The example is the readme is snap specific, please let me know how to do this in an established docker container which doesn't appear to run systemd.

Thank you

pierrelocus commented 2 years ago

Hi,

I'm not using Docker for it, but do you use a docker-compose.yml file ? If so, you can add the env variables like this :

rocketchat:
    ...
    environment:
      YOUR_ENV_VARIABLE=true

Keep me updated if you need further help :)

Regards

brendan-pike commented 2 years ago

I did add that later, but it didn't seem to take effect. Do I need to rebuild the container or is a restart enough?

brendan-pike commented 2 years ago

Okay, I worked it out and confirmed that the env. is set by using docker container inspect and could see, "CREATE_TOKENS_FOR_USERS=true", But when a user clicks the rocketchat in nextcloud menu they are just shown a login screen? I was expecting their RC account to be automatically created, what am I missing?

pierrelocus commented 2 years ago

Yes normally it should automatically register (if needed) + connect the user. Did you create the userId / Token pair in Nextcloud settings -> rocket chat ? If so, can you provide me with logs from Nextcloud ? (found in /path/to/nextcloud/data/nextcloud.log)

Thanks in advance,

We're gonna soon put a explanation video on how to set up from scratch, it'll perhaps help too.

brendan-pike commented 2 years ago

In the logs I see, "Undefined array key \"authToken\" at /var/www/nextcloud/apps/rocketchat_nextcloud/lib/Rocket/User.php#241" I tried regenerating the Auto generate Token and User ID in RC settings area but nothing changed. I tried removing/reinstall the rc app but it didn't help either.

pierrelocus commented 2 years ago

Hi @brendan-pike , I'm not forgetting about you, I'm checking code and a new release will be there by the end of the week. May I ask you, are you working on a Local environment or on servers with ssl installed etc ?

The module wouldn't work on local environments (or there are perhaps tweaks to do - I don't know them). Regards,

brendan-pike commented 2 years ago

Thanks @pierrelocus It is a local environment installation, ie. both nextcloud and RC are on the same server, I run Nginx and yes with SSL.

brendan-pike commented 2 years ago

Just a largely unrelated heads up, but I've decided to restart with a fresh RC install.

I've had a very frustrating start made worse it seems by poorly maintained docs, the official recommended docker install https://docs.rocket.chat/quick-start/installing-and-updating/rapid-deployment-methods/docker-and-docker-compose uses a deprecated Mongo 4.0 version which then requires a complex migration which is very unwelcoming for a new user. I managed to do this, but so many hours of frustration for a base level user like myself. I see there is some efforts to update this https://github.com/RocketChat/Rocket.Chat/pull/23426 but 5 months later and the recommended docker-compose.yml hasn't even been updated which is left me wondering what I should do.

sigh.

ruvenss commented 2 years ago

https://youtu.be/AshE2uG87GE @brendan-pike check our video, is not for a docker container but you can built your own containing both platforms

ruvenss commented 2 years ago

I will prepare a docker container having both platforms and publish in the 3rd quater of 2022