fix: Add environment variables and volumes

This commit is contained in:
Nard Théo
2024-09-16 16:34:13 +02:00
committed by GitHub
parent d2ea2ef4f3
commit 2741cb0017
2 changed files with 14 additions and 7 deletions

View File

@@ -24,8 +24,8 @@ PteroStats is a Discord App/Bot designed to check Pterodactyl or Pelican Panel s
- [Using Custom Emoji](#using-custom-emoji) - [Using Custom Emoji](#using-custom-emoji)
- [Blacklist Nodes](#blacklist-nodes) - [Blacklist Nodes](#blacklist-nodes)
- [Notifier](#notifier) - [Notifier](#notifier)
- - [Docker](#docker) - [Docker](#docker)
- [Installation](#installation-1) - [Installation](#installation)
- [Docker Compose](#docker-compose) - [Docker Compose](#docker-compose)
- [Docker Run](#docker-run) - [Docker Run](#docker-run)
@@ -179,7 +179,8 @@ curl -fsSL https://get.docker.com | sh
### Docker Compose ### Docker Compose
Copy the `docker-compose.yml` file to your server and run `docker compose pull` Copy the `docker-compose.yml` file to your server and run `docker compose pull`
Copy the `config.yml` file at the same directory as the `docker-compose.yml` file and configure it (refer to the [installation](#installation) section) Copy the `config.yml` file at the same directory as the `docker-compose.yml` file and configure it
Fill the environment variables in the `docker-compose.yml` file and run the bot using `docker compose up -d`
```bash ```bash
docker compose up -d docker compose up -d
@@ -189,7 +190,7 @@ docker compose logs -f pterostats
### Docker Run ### Docker Run
```bash ```bash
docker run -d --name pterostats -v $(pwd)/config.yml:/app/config.yml ghcr.io/hirzidevs/pterostats:latest docker run -d --name pterostats -e PanelURL=<PanelURL> -e PanelKEY=<PanelKEY> -e DiscordBotToken=<DISCORD_BOT_TOKEN> -e DiscordChannel=<DISCORD_CHANNEL_ID> -v $(pwd)/config.yml:/app/config.yml ghcr.io/hirzidevs/pterostats:latest
docker logs -f pterostats docker logs -f pterostats
``` ```
@@ -199,4 +200,4 @@ Enable `log_error` in the `config.yml` file and check the console for the error
## Links ## Links
- [Pterodactyl Discord Server](https://discord.gg/pterodactyl) - [Pterodactyl Discord Server](https://discord.gg/pterodactyl)
- [Pelican Discord Server](https://discord.gg/pelican-panel) - [Pelican Discord Server](https://discord.gg/pelican-panel)
- [Support Server](https://discord.znproject.my.id) - [Support Server](https://discord.znproject.my.id)

View File

@@ -1,7 +1,13 @@
version: '3.3' version: '3.3'
services: services:
pterostats: pterostats:
volumes:
- ./config.yml:/app/config.yml
container_name: pterostats container_name: pterostats
image: ghcr.io/hirzidevs/pterostats:latest image: ghcr.io/hirzidevs/pterostats:latest
restart: always
volumes:
- ./config.yml:/app/config.yml
environment:
- PanelURL=<PANEL_URL>
- PanelKEY=<PANEL_KEY>
- DiscordBotToken=<DISCORD_BOT_TOKEN>
- DiscordChannel=<DISCORD_CHANNEL_ID>