From 7c0e34e1f812fea6a736cb2770c5cbc451ddafdf Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 3 Oct 2022 15:27:24 +0200 Subject: [PATCH] Fixed docker crazy stuff --- docker-compose.yml | 12 +++++++++--- dockerfile | 2 +- src/bot/config/appsettings.production.json | 4 ++-- src/bot/config/appsettings.staging.json | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d7efce5a..70566042 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,12 @@ version: "3.9" volumes: kdb_prod_1: kdb_staging_1: + kdb_db_1: + kdb_db_2: services: kdb_prod_1: - image: kdb + image: kdb/kdb:0.2.1 container_name: kdb_prod_1 depends_on: - kdb_db_1 @@ -19,7 +21,7 @@ services: restart: unless-stopped kdb_staging_1: - image: kdb + image: kdb/kdb:0.2.1 container_name: kdb_staging_1 depends_on: - kdb_db_1 @@ -43,6 +45,8 @@ services: MYSQL_DATABASE: "kd_kdb" ports: - "3307:3306" + volumes: + - kdb_db_1:/var/lib/mysql kdb_db_2: image: mysql:latest @@ -55,4 +59,6 @@ services: MYSQL_PASSWORD: "kd_kdb" MYSQL_DATABASE: "kd_kdb" ports: - - "3308:3306" \ No newline at end of file + - "3308:3306" + volumes: + - kdb_db_2:/var/lib/mysql \ No newline at end of file diff --git a/dockerfile b/dockerfile index d5b739bc..b59a50a9 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM python:3.10.7-buster +FROM python:3.10.7-bullseye WORKDIR /app COPY ./dist/bot/build/ . diff --git a/src/bot/config/appsettings.production.json b/src/bot/config/appsettings.production.json index 346fff41..3cc710ac 100644 --- a/src/bot/config/appsettings.production.json +++ b/src/bot/config/appsettings.production.json @@ -38,11 +38,11 @@ ] }, "DatabaseSettings": { - "Host": "37.120.162.78", + "Host": "kdb_db_1", "User": "kd_kdb", "Password": "a2Rfa2Ri", "Database": "kd_kdb", - "Port": "3307", + "Port": "3306", "Charset": "utf8mb4", "UseUnicode": "true", "Buffered": "true", diff --git a/src/bot/config/appsettings.staging.json b/src/bot/config/appsettings.staging.json index c8a9d88b..d1cf1f42 100644 --- a/src/bot/config/appsettings.staging.json +++ b/src/bot/config/appsettings.staging.json @@ -38,11 +38,11 @@ ] }, "DatabaseSettings": { - "Host": "37.120.162.78", + "Host": "kdb_db_2", "User": "kd_kdb", "Password": "a2Rfa2Ri", "Database": "kd_kdb", - "Port": "3308", + "Port": "3306", "Charset": "utf8mb4", "UseUnicode": "true", "Buffered": "true",