From daaee048ffb4ce26050250e9b0b5a135609ee3cb Mon Sep 17 00:00:00 2001 From: HypoxiE Date: Fri, 22 Aug 2025 20:13:33 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B2=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20docker-compose=20=D0=B2=D1=81=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0=20krekchat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 5 +++ .gitattributes | 4 +- .gitmodules | 8 ++++ docker-compose.yml | 40 +++++++++++++------ economy-bot | 1 + moderation-bot | 1 + .../backups}/discord_economy_bot_backup.sql | 0 .../discord_moderation_bot_backup.sql | 0 {init => postgres/init}/00_init.sql | 0 9 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 .env create mode 100644 .gitmodules create mode 160000 economy-bot create mode 160000 moderation-bot rename {backups => postgres/backups}/discord_economy_bot_backup.sql (100%) rename {backups => postgres/backups}/discord_moderation_bot_backup.sql (100%) rename {init => postgres/init}/00_init.sql (100%) diff --git a/.env b/.env new file mode 100644 index 0000000..877797d --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +DB_HOST: krekbots-postgres +DB_PORT: 5432 +DB_USER: discord_economy_bot +DB_PASSWORD: economy_bot +DB_NAME: discord_economy_bot_db \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index f01a116..36b9a3f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -backups/discord_economy_bot_backup.sql -text -backups/discord_moderation_bot_backup.sql -text \ No newline at end of file +postgres/backups/discord_economy_bot_backup.sql -text +postgres/backups/discord_moderation_bot_backup.sql -text \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..30fee3b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule "economy-bot"] + path = economy-bot + url = https://github.com/HypoxiE/krekbot-economy.git + branch = tournament/ruinship + +[submodule "moderation-bot"] + path = moderation-bot + url = https://github.com/HypoxiE/krekbot-moderation.git diff --git a/docker-compose.yml b/docker-compose.yml index f05d663..a3f747c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,14 @@ networks: - postgres-network: - name: postgres-network + krekbots-network: + name: krekbots-network driver: bridge - driver_opts: - com.docker.network.bridge.enable_icc: "true" - com.docker.network.bridge.enable_ip_masquerade: "true" - attachable: true services: postgres: image: postgres:17 networks: - - postgres-network - container_name: shared-postgres + - krekbots-network + container_name: krekbots-postgres environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -20,7 +16,27 @@ services: ports: - "5432:5432" volumes: - # - ./pgdata:/var/lib/postgresql/data - - ./backups:/docker-entrypoint-backups:ro - - ./init:/docker-entrypoint-initdb.d:ro - restart: unless-stopped \ No newline at end of file + - ./postgres/pgdata:/var/lib/postgresql/data + - ./postgres/backups:/docker-entrypoint-backups:ro + - ./postgres/init:/docker-entrypoint-initdb.d:ro + restart: unless-stopped + + + krekbot-economy: + build: ./economy-bot + image: krekbot-economy + container_name: krekbot-economy + restart: always + networks: + - krekbots-network + env_file: + - .env + krekbot-moderation: + build: ./moderation-bot + image: krekbot-moderation + container_name: krekbot-moderation + restart: always + networks: + - krekbots-network + env_file: + - .env \ No newline at end of file diff --git a/economy-bot b/economy-bot new file mode 160000 index 0000000..39fa59e --- /dev/null +++ b/economy-bot @@ -0,0 +1 @@ +Subproject commit 39fa59e0098f256e1ce413ea9e5ad6ddf4119772 diff --git a/moderation-bot b/moderation-bot new file mode 160000 index 0000000..1fb7f2e --- /dev/null +++ b/moderation-bot @@ -0,0 +1 @@ +Subproject commit 1fb7f2e3270d7aaf9ffa4456b44cd374bd63f47f diff --git a/backups/discord_economy_bot_backup.sql b/postgres/backups/discord_economy_bot_backup.sql similarity index 100% rename from backups/discord_economy_bot_backup.sql rename to postgres/backups/discord_economy_bot_backup.sql diff --git a/backups/discord_moderation_bot_backup.sql b/postgres/backups/discord_moderation_bot_backup.sql similarity index 100% rename from backups/discord_moderation_bot_backup.sql rename to postgres/backups/discord_moderation_bot_backup.sql diff --git a/init/00_init.sql b/postgres/init/00_init.sql similarity index 100% rename from init/00_init.sql rename to postgres/init/00_init.sql