Added instructions for upgrading from release and source
This commit is contained in:
36
README.md
36
README.md
@@ -15,10 +15,10 @@ Open source Discord bot for quizzes and quest-like events.
|
|||||||
### Installation from release
|
### Installation from release
|
||||||
|
|
||||||
1. Download the release archive from [Releases](https://git.end-play.xyz/profitroll/QuizBot/releases)
|
1. Download the release archive from [Releases](https://git.end-play.xyz/profitroll/QuizBot/releases)
|
||||||
2. Unpack the archive to a folder of your choice
|
2. Unpack the archive to a directory of your choice
|
||||||
3. Go to the project folder
|
3. Go to the project's directory
|
||||||
4. Create a virtual environment: `python3 -m venv .venv`
|
4. Create a virtual environment: `python3 -m venv .venv`
|
||||||
5. Activate virtual environment:
|
5. Activate the virtual environment:
|
||||||
- Linux: `source .venv/bin/activate`
|
- Linux: `source .venv/bin/activate`
|
||||||
- Windows (cmd): `.venv/bin/activate.bat`
|
- Windows (cmd): `.venv/bin/activate.bat`
|
||||||
- Windows (PowerShell): `.venv/bin/activate.ps1`
|
- Windows (PowerShell): `.venv/bin/activate.ps1`
|
||||||
@@ -26,11 +26,13 @@ Open source Discord bot for quizzes and quest-like events.
|
|||||||
7. Copy example config to a real file: `cp config_example.json config.json`
|
7. Copy example config to a real file: `cp config_example.json config.json`
|
||||||
8. Configure the bot (see [Configuration](#configuration))
|
8. Configure the bot (see [Configuration](#configuration))
|
||||||
9. Start the bot: `python main.py`
|
9. Start the bot: `python main.py`
|
||||||
|
10. The bot can be stopped by a keyboard interrupt (`Ctrl+C`) and a virtual environment can be deactivated using
|
||||||
|
`deactivate`
|
||||||
|
|
||||||
### Installation from source
|
### Installation from source
|
||||||
|
|
||||||
1. Clone the repository: `git clone https://git.end-play.xyz/profitroll/QuizBot.git`
|
1. Clone the repository: `git clone https://git.end-play.xyz/profitroll/QuizBot.git`
|
||||||
2. Go to the project's folder: `cd QuizBot`
|
2. Go to the project's directory: `cd QuizBot`
|
||||||
3. Continue from step 4 of [Installation from release](#installation-from-release)
|
3. Continue from step 4 of [Installation from release](#installation-from-release)
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@@ -39,7 +41,29 @@ TODO
|
|||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
TODO
|
### Upgrading from release
|
||||||
|
|
||||||
|
Installing over the older version is not supported. Fresh installation is necessary to prevent data corruption.
|
||||||
|
|
||||||
|
1. Make a backup of the project's directory. Some of the old files will be reused
|
||||||
|
2. Follow the [Installation from release](#installation-from-release) from the beginning and stop before 7th step
|
||||||
|
3. Copy file `config.json` and directory `data` from the backup you made into the new installation's directory
|
||||||
|
4. While still in the virtual environment, migrate the database: `python main.py --migrate`
|
||||||
|
|
||||||
|
After these steps are performed, the bot is ready to be started and used.
|
||||||
|
|
||||||
|
### Upgrading from source
|
||||||
|
|
||||||
|
1. Make a backup of the project's directory
|
||||||
|
2. Go to the project's directory
|
||||||
|
3. Update the project: `git pull`
|
||||||
|
4. Activate the virtual environment:
|
||||||
|
- Linux: `source .venv/bin/activate`
|
||||||
|
- Windows (cmd): `.venv/bin/activate.bat`
|
||||||
|
- Windows (PowerShell): `.venv/bin/activate.ps1`
|
||||||
|
5. Migrate the database: `python main.py --migrate`
|
||||||
|
|
||||||
|
After these steps are performed, the bot is ready to be started and used.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -51,4 +75,4 @@ TODO
|
|||||||
Only admins should have access to following commands: `/config`, `/event`, `/stage` and `/user`.
|
Only admins should have access to following commands: `/config`, `/event`, `/stage` and `/user`.
|
||||||
Allowing access to `/status` is not recommended, however won't do any harm if done so.
|
Allowing access to `/status` is not recommended, however won't do any harm if done so.
|
||||||
3. Configure bot for usage on your server using `/config set` providing all the necessary arguments.
|
3. Configure bot for usage on your server using `/config set` providing all the necessary arguments.
|
||||||
Timezones are compatible with summer time (e.g. `CET` will be interpreted as `CEST` during summer time).
|
Timezones are compatible with daylight saving time (e.g. `CET` will be interpreted as `CEST` during daylight saving).
|
Reference in New Issue
Block a user