From 2741cb00179fb037a71ae0309f2ecd65c251da97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nard=20Th=C3=A9o?= <58373303+PandeoF1@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:34:13 +0200 Subject: [PATCH] fix: Add environment variables and volumes --- README.md | 11 ++++++----- docker-compose.yml | 10 ++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 03c89fe..4d2e557 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ PteroStats is a Discord App/Bot designed to check Pterodactyl or Pelican Panel s - [Using Custom Emoji](#using-custom-emoji) - [Blacklist Nodes](#blacklist-nodes) - [Notifier](#notifier) -- - [Docker](#docker) - - [Installation](#installation-1) +- [Docker](#docker) + - [Installation](#installation) - [Docker Compose](#docker-compose) - [Docker Run](#docker-run) @@ -179,7 +179,8 @@ curl -fsSL https://get.docker.com | sh ### Docker Compose 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 docker compose up -d @@ -189,7 +190,7 @@ docker compose logs -f pterostats ### Docker Run ```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= -e PanelKEY= -e DiscordBotToken= -e DiscordChannel= -v $(pwd)/config.yml:/app/config.yml ghcr.io/hirzidevs/pterostats:latest docker logs -f pterostats ``` @@ -199,4 +200,4 @@ Enable `log_error` in the `config.yml` file and check the console for the error ## Links - [Pterodactyl Discord Server](https://discord.gg/pterodactyl) - [Pelican Discord Server](https://discord.gg/pelican-panel) -- [Support Server](https://discord.znproject.my.id) \ No newline at end of file +- [Support Server](https://discord.znproject.my.id) diff --git a/docker-compose.yml b/docker-compose.yml index 99a83ae..d0176f4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,13 @@ version: '3.3' services: pterostats: - volumes: - - ./config.yml:/app/config.yml container_name: pterostats image: ghcr.io/hirzidevs/pterostats:latest + restart: always + volumes: + - ./config.yml:/app/config.yml + environment: + - PanelURL= + - PanelKEY= + - DiscordBotToken= + - DiscordChannel=