Deploying
Closed this issue · 3 comments
I was curious if you could explain the deployment process for hosting this on my own server. Exact instructions aren't needed, but a general overview would be great. I saw the comments in the nhlbot
file but makes reference to a jar
file and a non-existent "builds" directory ($INSTALL_DIR/builds/nhlbot
). Also just for verifying, BOT_KEY
means the App Bot User's token, correct?
Thanks for this great looking bot!
The project is to built by maven.
Try: maven clean install -U -DskipITs -DskipUTs
It should output a built jar in the project's /target
folder.
BOT_KEY
refers to 'App Bot User Token'. (the one that lets your bot login). You might need to rewrite the script to fit your user/directory setup.
Essentially the jar can be run via the java command with the BOT_KEY
as the first parameter to start it up. Try java -cp $PATH_TO_JAR com.hazeluff.discord.nhlbot.BotRunner $BOT_KEY
. Where $PATH_TO_JAR
is the path to the built jar and BOT_KEY
is the 'App Bot User Token'.
Notes:
I have a specific setup with my users/directories on my server which the deploy.sh
and nhlbot.sh
scripts depend on. $INSTALL_DIR/builds/nhlbot
is part of that specific setup. Those files can be re-purposed for your needs if you change file paths/users.
You also need a mongoDB instance for the bot to work. The details to connect to it needs to be configured in Config.java
Sorry I don't have detailed instructions. I wasn't prepared for others to try and build and use the code. Right now I'm running an instance on my server that everyone is free to use.
Hey, thanks for the response! I installed maven and successfully built the project using the maven clean install
command you provided (at first it failed but I upgraded Java from 1.7x to 1.8x and it worked fine after that).
I'll admit though, the directory structure and location of files is a little confusing. I'm not sure what is where, and which of the files I need to use.
So for now, I think I'll just add your bot to the server. Sorry to have wasted your time, but I do appreciate the bot's service!
Thanks for understanding =)