Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running the project on server #3

Open
staminna opened this issue Sep 23, 2021 · 8 comments
Open

running the project on server #3

staminna opened this issue Sep 23, 2021 · 8 comments

Comments

@staminna
Copy link

staminna commented Sep 23, 2021

Hi WahisNasri,

Edit: I went ahead and installed HiveMQ on docker, running localhost port 8080.
I copied the project code into the /extensions/ directory on the root of the docker container.
What are the configuration files to be edited?

@WahidNasri
Copy link
Owner

Hello,
The readme is now updated.
Can you check if it is more helpful?

@lucasjinreal
Copy link

lucasjinreal commented Oct 7, 2021

@WahidNasri Hi, sorry for my bad understanding but I still can't figure out how to edit 2 things:

  1. enviroment variable, it's some config files to edit or my system enviroment variable? I think I don't have access to add such enviroment variable on my server (company's server), any otherway to do it?
  2. I have chat.sql, but how to dump it to my database? In my case, I want using postgres, is there a way to edit it? (on server side)

@lucasjinreal
Copy link

I think maybe chat.sql doesn't appiable to postgres:

psql -d uranus -U root -f chat.sql 
psql:chat.sql:10: ERROR:  unrecognized configuration parameter "sql_mode"
START TRANSACTION
psql:chat.sql:12: ERROR:  unrecognized configuration parameter "time_zone"
psql:chat.sql:36: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `invitation` (
                     ^
psql:chat.sql:55: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `message` (
                     ^
psql:chat.sql:68: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `room` (
                     ^
psql:chat.sql:80: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `room_membership` (
                     ^
psql:chat.sql:94: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `session` (
                     ^
psql:chat.sql:109: ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `user` (
                     ^
psql:chat.sql:118: ERROR:  syntax error at or near "`"
LINE 1: INSERT INTO `user` (`id`, `email`, `first_name`, `last_name`...
                    ^
psql:chat.sql:128: ERROR:  syntax error at or near "`"
LINE 1: ALTER TABLE `message`
                    ^
psql:chat.sql:134: ERROR:  syntax error at or near "`"
LINE 1: ALTER TABLE `room`
                    ^
psql:chat.sql:140: ERROR:  syntax error at or near "`"
LINE 1: ALTER TABLE `session`
                    ^
psql:chat.sql:146: ERROR:  syntax error at or near "`"
LINE 1: ALTER TABLE `user`
                    ^
ROLLBACK

@WahidNasri
Copy link
Owner

Hi,
For the environment variables , it has to be system environment variables.. perhaps it will be other options on the future.

For the database, the project for now works with pure relational database.

@lucasjinreal
Copy link

@WahidNasri Hi, thanks for reply. in my humble opinion, set to enviroment is not quit convinient in terms of if I want push into production and host on a server,
because it not involved into a git repo, and change it could be very tricky, and everytime I try to change it, I need source the env variables as well as restart program.
Could u consider it and directly put it into a simple config.java or something?

@WahidNasri
Copy link
Owner

@jinfagang

Good point. The reason why I used environment variables is to be able to just run an already built version of the extension wherever you need.

@lucasjinreal
Copy link

@WahidNasri thanks! However, if you set a variable directly in your code, your distribution of this build extension also can run anywhere.

Anyway, either way is good to fit certain situation. Could u kindly point me where does it takes (read) these enviroment variabls? I want have a hack on it.

@staminna
Copy link
Author

staminna commented Oct 18, 2021

The extension is not loaded by HiveMQ even though it is in the /extensions/hivemq-chat-extension
I am using the latest versions of the software. 

Nevermind. I found out a the zip file I had to decompress and copy over to the Docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants