MeidokonWiki:

nadeko

Has been decommissioned on 2019-11-15

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.

How to build

We use this guide once it's time to install Nadeko: https://nadekobot.readthedocs.io/en/latest/guides/Docker%20Guide/

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).

  1. Pull the latest version (or a specific version if you prefer):

    docker pull uirel/nadeko:latest
  2. Stop and remove the existing container:

    docker stop nadeko; docker rm nadeko
  3. Create a new instance of the container. This keeps your old config DB and hooks it into the new instance:

    docker create --name=nadeko \
        --restart always \
        -v /opt/nadeko/conf/:/root/nadeko \
        -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \
        uirel/nadeko:1.4
    (should this be --restart unless-stopped?)
    • Is this the right syntax? The version number may need updating at the end of the line.
  4. Start the new version of Nadeko and follow the logs:

    docker start nadeko; docker logs -f nadeko

Major upgrade notes

http://nadekobot.readthedocs.io/en/latest/guides/Docker%20Guide/

Based on this: https://github.com/willysunny/Nadecker/blob/master/Dockerfile

# 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


mkdir /root/2018-01-30_nadeko_backup

docker cp nadeko:/root/nadeko/credentials.json /root/2018-01-30_nadeko_backup/credentials.json

# migrating to this
docker cp nadeko:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data/NadekoBot.db NadekoBot.db

# coming from this
docker cp nadeko:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/NadekoBot.db /root/2018-01-30_nadeko_backup/NadekoBot.db


# delete the old one
docker rm nadeko


# make the new one
# orig
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
# new
docker create --name=nadeko -v /opt/nadeko/conf:/root/nadeko  -v /opt/nadeko/data/:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data willysunny/nadecker:latest
# good fresh one
docker create --name=nadeko -v /opt/nadeko/conf:/root/nadeko  -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data --restart always willysunny/nadecker:2.13.8

MeidokonWiki: servers/nadeko (last edited 2019-11-15 14:32:41 by furinkan)