docker/docs: dockerize and add+modify documentation
This commit is contained in:
parent
62e7a1393b
commit
429e89bf1d
4 changed files with 78 additions and 2 deletions
45
README.md
45
README.md
|
@ -9,10 +9,10 @@ Kowalski is a a simple Telegram bot made in Node.js.
|
|||
|
||||
## Self-host requirements
|
||||
|
||||
- Node.js 20 or newer (you can also use Bun)
|
||||
- Node.js 20 or newer (you can also use [Bun](https://bun.sh))
|
||||
- A Telegram bot (create one at [@BotFather](https://t.me/botfather))
|
||||
- Latest version of Node.js
|
||||
- FFmpeg (only for the `/yt` command)
|
||||
- Docker and Docker Compose (only required for Docker setup)
|
||||
|
||||
## Run it yourself, develop or contribute with Kowalski
|
||||
|
||||
|
@ -36,6 +36,47 @@ After editing the file, save all changes and run the bot with ``npm start``.
|
|||
> [!TIP]
|
||||
> To deal with dependencies, just run ``npm install`` or ``npm i`` at any moment to install all of them.
|
||||
|
||||
## Running with Docker
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Please complete the above steps to prepare your local copy for building. You do not need to install FFmpeg on your host system.
|
||||
|
||||
You can also run Kowalski using Docker, which simplifies the setup process. Make sure you have Docker and Docker Compose installed.
|
||||
|
||||
### Using Docker Compose
|
||||
|
||||
1. **Make sure to setup your `config.env` file first!**
|
||||
|
||||
2. **Run the container**
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The `-d` flag causes the bot to run in the background. If you're just playing around, you may not want to use this flag.
|
||||
|
||||
### Using Docker Run
|
||||
|
||||
If you prefer to use Docker directly, you can use these instructions instead.
|
||||
|
||||
1. **Make sure to setup your `config.env` file first!**
|
||||
|
||||
2. **Build the image**
|
||||
|
||||
```bash
|
||||
docker build -t kowalski .
|
||||
```
|
||||
|
||||
3. **Run the container**
|
||||
|
||||
```bash
|
||||
docker run -d --name kowalski --restart unless-stopped -v $(pwd)/config.env:/usr/src/app/config.env:ro kowalski
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The `-d` flag causes Kowalski to run in the background. If you're just playing around, you may not want to use this flag.
|
||||
|
||||
## config.env Functions
|
||||
|
||||
- **botSource**: Put the link to your bot source code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue