Size: 2316
Comment: line wrapping
|
Size: 2337
Comment: line wrapping
|
Deletions are marked like this. | Additions are marked like this. |
Line 20: | Line 20: |
docker create --name=nadeko -v /opt/nadeko/conf/:/root/nadeko -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data uirel/nadeko:1.4 | docker create --name=nadeko \ -v /opt/nadeko/conf/:/root/nadeko \ -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \ uirel/nadeko:1.4 |
nadeko
Runs a Nadeko bot for Discord. Nadeko is written in C# and I don't want to deal with dotnet junk on Linux, so I'm using a Dockerised version of Nadeko.
The base OS is Vultr's Docker platform, so it's Centos 7 under the hood with Docker packages preinstalled. I run puppet against it to setup the shell niceties but the rest is pretty much stock.
- Centos 7 x64
- Vultr's docker platform image
- puppet managed
How to build
We use this guide once it's time to install Nadeko: https://nadekobot.readthedocs.io/en/latest/guides/Docker%20Guide/
- Fire up a fresh machine
- Get it puppeted
Puppet should put /opt/nadeko/conf in place
Create nadeko from docker image, this won't start the bot yet though
docker create --name=nadeko \ -v /opt/nadeko/conf/:/root/nadeko \ -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \ uirel/nadeko:1.4
Go read how to setup your credentials: https://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/
- Register your bot as directed
Create /opt/nadeko/conf/credentials.json and fill in the necessary details. Client ID, Token, Client Secret, Username
Start the container:
docker start nadeko; docker logs -f nadeko
- Visit the oauth2 authorize URL to “pull” the bot onto the server the first time
Updating the Nadeko code version
They'll publish updates every now and then as an updated Docker image. This should roughly do it (I haven't tested it for real yet).
Pull the latest version (or a specific version if you prefer):
docker pull uirel/nadeko:latest
Stop and remove the existing container:
docker stop nadeko; docker rm nadeko
Create a new instance of the container. This keeps your old config DB and hooks it into the new instance:
docker create --name=nadeko \ -v /opt/nadeko/conf/:/root/nadeko \ -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \ uirel/nadeko:1.4
- Is this the right syntax? The version number may need updating at the end of the line.
Start the new version of Nadeko and follow the logs:
docker start nadeko; docker logs -f nadeko