mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
updated docs formatting and windows from source update guide
This commit is contained in:
@@ -1,3 +1,35 @@
|
||||
# Setting up NadekoBot with Docker
|
||||
|
||||
Soon:tm:
|
||||
# DO NOT USE YET - WORK IN PROGRESS
|
||||
|
||||
Upgrade from 2.x to v3 does not work because the file is mount readonly
|
||||
|
||||
### Docker Compose
|
||||
```yml
|
||||
version: "3.7"
|
||||
services:
|
||||
nadeko:
|
||||
image: registry.gitlab.com/veovis/nadekobot:v3-docker
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
#NadekoBot_RedisOptions: redis,name=nadeko
|
||||
#NadekoBot_ShardRunCommand: dotnet
|
||||
#NadekoBot_ShardRunArguments: /app/NadekoBot.dll {0} {1}
|
||||
volumes:
|
||||
- /srv/nadeko/conf/creds.yml:/app/creds.yml:ro
|
||||
- /srv/nadeko/data:/app/data
|
||||
|
||||
redis:
|
||||
image: redis:4-alpine
|
||||
sysctls:
|
||||
- net.core.somaxconn=511
|
||||
command: redis-server --maxmemory 32M --maxmemory-policy volatile-lru
|
||||
volumes:
|
||||
- /srv/nadeko/redis-data:/data
|
||||
```
|
||||
### Updating
|
||||
- `cd /srv/nadeko`
|
||||
- `docker-compose pull`
|
||||
- `docker-compose up -d`
|
||||
|
@@ -16,12 +16,12 @@ Open Terminal (if you're on an installation with a window manager) and navigate
|
||||
4. Exit the installer in order to set up your `creds.yml`
|
||||
5. Copy the creds.yml template `cp nadekobot/output/creds_example.yml nadekobot/output/creds.yml`
|
||||
6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
7. [Enter your bot's token](../../creds-guide)
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
- `Enter`
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
- `Enter`
|
||||
8. Run the bot (type `3` and press enter)
|
||||
|
||||
##### Update Instructions
|
||||
@@ -37,51 +37,51 @@ Open Terminal (if you're on an installation with a window manager) and navigate
|
||||
##### Installation Instructions
|
||||
|
||||
1. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases>
|
||||
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
|
||||
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
|
||||
2. Untar it
|
||||
- ⚠ Make sure that you change X.XX.X to the same series of numbers as in step 1!
|
||||
- `tar xf X.XX.X-linux-x64-build.tar`
|
||||
- ⚠ Make sure that you change X.XX.X to the same series of numbers as in step 1!
|
||||
- `tar xf X.XX.X-linux-x64-build.tar`
|
||||
3. Rename the `nadekobot-linux-x64` to `nadekobot`
|
||||
- `mv nadekobot-linux-x64 nadekobot`
|
||||
- `mv nadekobot-linux-x64 nadekobot`
|
||||
4. Move into nadekobot directory and make NadekoBot executable
|
||||
- `cd nadekobot && chmod +x NadekoBot`
|
||||
- `cd nadekobot && chmod +x NadekoBot`
|
||||
5. Copy the creds.yml template
|
||||
- `cp creds_example.yml creds.yml`
|
||||
- `cp creds_example.yml creds.yml`
|
||||
6. Open `creds.yml` with your favorite text editor. We will use nano here
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
- `nano nadekobot/output/creds.yml`
|
||||
8. [Enter your bot's token](#creds-guide)
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
- `Enter`
|
||||
- After you're done, you can close nano (and save the file) by inputting, in order
|
||||
- `CTRL` + `X`
|
||||
- `Y`
|
||||
- `Enter`
|
||||
9. Run the bot
|
||||
- `./NadekoBot`
|
||||
- `./NadekoBot`
|
||||
|
||||
##### Update Instructions
|
||||
|
||||
1. Stop the bot
|
||||
2. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases>
|
||||
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
|
||||
- Look for the file called "x.x.x-linux-x64-build.tar" (where `X.X.X` is a version, for example 3.0.4) and download it
|
||||
3. Untar it
|
||||
- ⚠ Make sure that you change X.XX.X to the same series of numbers as in step 2!
|
||||
- `tar xf 2.99.8-linux-x64-build.tar`
|
||||
- ⚠ Make sure that you change `X.X.X` to the same series of numbers as in step 2!
|
||||
- `tar xf x.x.x-linux-x64-build.tar`
|
||||
4. Rename the old nadekobot directory to nadekobot-old (remove your old backup first if you have one, or back it up under a different name)
|
||||
- `rm -rf nadekobot-old 2>/dev/null`
|
||||
- `mv nadekobot nadekobot-old`
|
||||
- `rm -rf nadekobot-old 2>/dev/null`
|
||||
- `mv nadekobot nadekobot-old`
|
||||
5. Rename the new nadekobot directory to nadekobot
|
||||
- `mv nadekobot-linux-x64 nadekobot`
|
||||
- `mv nadekobot-linux-x64 nadekobot`
|
||||
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
|
||||
- ⚠ If you've modified said files, back them up instead
|
||||
- `rm nadekobot-old/data/aliases.yml`
|
||||
- `rm -r nadekobot-old/data/strings`
|
||||
- ⚠ If you've modified said files, back them up instead
|
||||
- `rm nadekobot-old/data/aliases.yml`
|
||||
- `rm -r nadekobot-old/data/strings`
|
||||
7. Copy old data
|
||||
- `cp -RT nadekobot-old/data/ nadekobot/data/`
|
||||
- `cp -RT nadekobot-old/data/ nadekobot/data`
|
||||
8. Copy creds.yml
|
||||
- `cp nadekobot-old/creds.yml nadekobot/`
|
||||
- `cp nadekobot-old/creds.yml nadekobot/`
|
||||
9. Move into nadekobot directory and make the NadekoBot executable
|
||||
- `cd nadekobot && chmod +x NadekoBot`
|
||||
- `cd nadekobot && chmod +x NadekoBot`
|
||||
10. Run the bot
|
||||
- `./NadekoBot`
|
||||
- `./NadekoBot`
|
||||
|
||||
🎉 Enjoy
|
||||
|
||||
@@ -95,7 +95,7 @@ mv nadekobot nadekobot-old && \
|
||||
mv nadekobot-linux-x64 nadekobot && \
|
||||
rm nadekobot-old/data/aliases.yml && \
|
||||
rm -r nadekobot-old/data/strings && \
|
||||
cp -RT nadekobot-old/data/ nadekobot/data/ && \
|
||||
cp -RT nadekobot-old/data/ nadekobot/data && \
|
||||
cp nadekobot-old/creds.yml nadekobot/ && \
|
||||
cd nadekobot && chmod +x NadekoBot
|
||||
```
|
||||
|
@@ -80,6 +80,7 @@ You can still install them manually:
|
||||
Open PowerShell (press windows button on your keyboard and type powershell, it should show up; alternatively, right click the start menu and select Windows PowerShell), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`)
|
||||
|
||||
1. `git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1`
|
||||
2. `cd nadekobot`
|
||||
3. `dotnet publish -c Release -o output/ src/NadekoBot/`
|
||||
4. `cd output && cp creds_example.yml creds.yml`
|
||||
5. Open `creds.yml` with your favorite text editor (Please don't use Notepad or WordPad. You can use Notepad++, VSCode, Atom, Sublime, or something similar)
|
||||
@@ -91,16 +92,30 @@ Open PowerShell (press windows button on your keyboard and type powershell, it s
|
||||
|
||||
Open PowerShell as described above and run the following commands:
|
||||
|
||||
1. Navigate to your bot's folder, for example `cd ~/Desktop/nadekobot/src/NadekoBot`
|
||||
2. Pull the latest updates (this will fail if you have custom code changes).
|
||||
- If you don't have custom code changes, just run `git pull`
|
||||
- If you do have custom code changes, You have 3 options
|
||||
- Undo all changes with `git checkout -- * && git pull`
|
||||
- Stash changes and try to re-apply them `git stash && git pull && git stash apply`
|
||||
- Commit your changes and resolve merge conflicts `git add . && git commit -m "My commit message" && git pull`
|
||||
3. Re-run the bot `dotnet run -c Release`
|
||||
1. Stop the bot
|
||||
- ⚠️ Make sure you don't have your database, credentials or any other nadekobot folder open in some application, this might prevent some of the steps from executing succesfully
|
||||
2. Navigate to your bot's folder, example:
|
||||
- `cd ~/Desktop/nadekobot`
|
||||
3. Pull the new version
|
||||
- `git pull`
|
||||
- ⚠️ If this fails, you may want to stash or remove your code changes if you don't know how to resolve merge conflicts
|
||||
4. **Backup** old output in case your data is overwritten
|
||||
- `cp -r -fo output/ output-old`
|
||||
5. Build the bot again
|
||||
- `dotnet publish -c Release -o output/ src/NadekoBot/`
|
||||
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
|
||||
- ⚠ If you've modified said files, back them up instead
|
||||
- `rm output-old/data/aliases.yml`
|
||||
- `rm -r output-old/data/strings`
|
||||
7. Copy old data
|
||||
- `cp -Recurse .\output-old\data\ .\output\ -Force`
|
||||
8. Copy creds.yml
|
||||
- `cp output-old/creds.yml output/`
|
||||
9. Run the bot
|
||||
- `cd output`
|
||||
- `dotnet NadekoBot.dll`
|
||||
|
||||
⚠ You're expected to understand that your database will be in `bin/Release/<framework>/data/`, and if `<framework>` gets changed in the future, you will have to move your database manually.
|
||||
🎉 Enjoy
|
||||
|
||||
#### Music prerequisites
|
||||
In order to use music commands, you need ffmpeg and youtube-dl installed.
|
||||
|
Reference in New Issue
Block a user