yGuy / chatgpt-mattermost-bot

A very simple implementation of a service for a mattermost bot that uses ChatGPT in the backend.
MIT License
145 stars 50 forks source link

Querying the MATTERMOST_URL environment variable #54

Closed knkoisme closed 5 months ago

knkoisme commented 11 months ago

I'm completely new to web development and programming, so I'd like to apologize for asking such a basic question. I've been telling my team that i can build a great chat app with chatgpt, and now I'm regretting it. I've been searching for two weeks and still haven't solved it.

I'm running mattermost with docker on my synology NAS I followed this manual : https://mariushosting.com/how-to-install-mattermost-on-your-synology-nas/

Mattermost's site URL is a reverse proxy set up on the synology nas. It's in the form of "https://chat.nickname.synology.me" and I've also created a websocket custom header.

And when I run the chatgpt-mattermost-bot container, I always get an error log about websocket and it won't run. Testing with npm install -> npm run start tells me that there is a problem with MATTERMOST_URL.

For the value of MATTERMOST_URL, I put "https://caht.nickname.synology.me" from the /admin_console/environment/web_server path, but maybe I'm wrong.

I'm writing in a translator, so again, I apologize if the context is weird.

(error) container log.txt (error) npm run start.txt docker-compose.txt 1 container manager -  mattermost 3 reverse proxy rules - mattermost 1 4 reverse proxy rules - mattermost 2 5 mattermost - system console

JoKneeMo commented 10 months ago

Your issue looks to be that you're running the bot container on the same hosts as mattermost, but the DNS name is not resolvable.

Based on your screenshots, you should probably change your value to one of the options below:

Regardless of the outcome above, this is an issue to take up with Synology, Docker, or Google as it is directly related to your knowledge of how to run multiple containers on the same host. This is outside the scope of a GitHub code issue.