97 lines
2.3 KiB
Markdown
97 lines
2.3 KiB
Markdown
# Docker Deployment for Discord-Jellyseerr Bot
|
|
|
|
This document contains instructions for deploying the Discord-Jellyseerr Bot using Docker.
|
|
|
|
## Prerequisites
|
|
|
|
- Docker installed on your host machine
|
|
- Docker Compose installed on your host machine
|
|
- A valid Discord bot token
|
|
- Access to a Jellyseerr instance
|
|
|
|
## Deployment Steps
|
|
|
|
### 1. Configure Environment Variables
|
|
|
|
Make sure your `.env` file is properly configured with the following variables:
|
|
|
|
```
|
|
# Discord Bot Token (required)
|
|
DISCORD_BOT_TOKEN=your_discord_bot_token_here
|
|
|
|
# Bot command prefix (default is !)
|
|
BOT_PREFIX=!
|
|
|
|
# Jellyseerr Configuration (required)
|
|
JELLYSEERR_URL=http://your-jellyseerr-instance:5055
|
|
JELLYSEERR_EMAIL=your_jellyseerr_email@example.com
|
|
JELLYSEERR_PASSWORD=your_jellyseerr_password
|
|
|
|
# Notification Settings
|
|
# Set to 'true' to enable notifications for these events
|
|
NOTIFY_REQUEST_APPROVED=true
|
|
NOTIFY_REQUEST_DECLINED=true
|
|
NOTIFY_MEDIA_AVAILABLE=true
|
|
|
|
# Notification Channel ID (leave empty to disable notifications)
|
|
NOTIFICATION_CHANNEL_ID=your_channel_id_here
|
|
|
|
# UI Settings
|
|
EMBED_COLOR=0x3498db
|
|
```
|
|
|
|
### 2. Build and Deploy with Docker Compose
|
|
|
|
Run the following command in the project directory to build and start the bot:
|
|
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
This will:
|
|
- Build the Docker image for the bot
|
|
- Start the container in detached mode
|
|
- Mount the project directory to the container
|
|
- Mount the logs directory for persistent logs
|
|
|
|
### 3. View Logs
|
|
|
|
You can view the logs of the running container with:
|
|
|
|
```bash
|
|
docker-compose logs -f
|
|
```
|
|
|
|
### 4. Stop the Bot
|
|
|
|
To stop the bot, run:
|
|
|
|
```bash
|
|
docker-compose down
|
|
```
|
|
|
|
### 5. Update the Bot
|
|
|
|
To update the bot after making changes to the code:
|
|
|
|
```bash
|
|
docker-compose build
|
|
docker-compose up -d
|
|
```
|
|
|
|
## Persistent Data
|
|
|
|
The Docker setup mounts the following directories for persistent data:
|
|
- The entire project directory for easy updates
|
|
- The logs directory to retain log files
|
|
|
|
## Troubleshooting
|
|
|
|
If you encounter issues:
|
|
|
|
1. Check the logs using `docker-compose logs -f`
|
|
2. Verify your `.env` file has the correct credentials
|
|
3. Ensure your Discord bot token is valid
|
|
4. Confirm you can access your Jellyseerr instance from the Docker host
|
|
|
|
For authentication issues, verify that the Jellyseerr user account has the necessary permissions and that local authentication is enabled in Jellyseerr. |