From 1a8c74d9e0fdd2ebe8a91a2e5b71d9ddb9849214 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 3 Oct 2022 04:39:00 +0200 Subject: [PATCH] Fixed docker stuff to work --- docker-compose.yml | 12 ++++++++-- dockerfile | 4 +++- src/bot/config/appsettings.production.json | 2 +- src/bot/config/appsettings.staging.json | 2 +- src/bot_core/helper/__init__.py | 26 ++++++++++++++++++++++ src/bot_core/logging/__init__.py | 25 +++++++++++++++++++++ 6 files changed, 66 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fde8d204c0..d7efce5a80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,17 @@ version: "3.9" +volumes: + kdb_prod_1: + kdb_staging_1: + services: kdb_prod_1: image: kdb - container_name: kdb_1 + container_name: kdb_prod_1 depends_on: - kdb_db_1 + volumes: + - kdb_prod_1:/app environment: KDB_ENVIRONMENT: "production" KDB_TOKEN: "" @@ -14,9 +20,11 @@ services: kdb_staging_1: image: kdb - container_name: kdb_1 + container_name: kdb_staging_1 depends_on: - kdb_db_1 + volumes: + - kdb_staging_1:/app environment: KDB_ENVIRONMENT: "staging" KDB_TOKEN: "" diff --git a/dockerfile b/dockerfile index 9767ceb4d4..d5b739bcb1 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM python:3.10 +FROM python:3.10.7-buster WORKDIR /app COPY ./dist/bot/build/ . @@ -8,6 +8,8 @@ RUN pip install cpl-core --extra-index-url https://pip.sh-edraft.de RUN pip install cpl-discord --extra-index-url https://pip.sh-edraft.de RUN pip install cpl-query --extra-index-url https://pip.sh-edraft.de RUN pip install cpl-translation --extra-index-url https://pip.sh-edraft.de +RUN apt-get update -y +RUN apt-get install nano -y ENV KDB_TOKEN="" ENV KDB_PREFIX="!kdb " diff --git a/src/bot/config/appsettings.production.json b/src/bot/config/appsettings.production.json index 493deaba58..4ee8735636 100644 --- a/src/bot/config/appsettings.production.json +++ b/src/bot/config/appsettings.production.json @@ -38,7 +38,7 @@ ] }, "DatabaseSettings": { - "Host": "localhost", + "Host": "37.120.162.78", "User": "kd_kdb", "Password": "a2Rfa2Ri", "Database": "kd_kdb", diff --git a/src/bot/config/appsettings.staging.json b/src/bot/config/appsettings.staging.json index ce9e65210c..72fb76c1c9 100644 --- a/src/bot/config/appsettings.staging.json +++ b/src/bot/config/appsettings.staging.json @@ -38,7 +38,7 @@ ] }, "DatabaseSettings": { - "Host": "localhost", + "Host": "37.120.162.78", "User": "kd_kdb", "Password": "a2Rfa2Ri", "Database": "kd_kdb", diff --git a/src/bot_core/helper/__init__.py b/src/bot_core/helper/__init__.py index e69de29bb2..ca4ef71584 100644 --- a/src/bot_core/helper/__init__.py +++ b/src/bot_core/helper/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +""" +bot Keksdose bot +~~~~~~~~~~~~~~~~~~~ + +Discord bot for the Keksdose discord Server + +:copyright: (c) 2022 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = 'bot_core.helper' +__author__ = 'Sven Heidemann' +__license__ = 'MIT' +__copyright__ = 'Copyright (c) 2022 sh-edraft.de' +__version__ = '0.2.0' + +from collections import namedtuple + + +# imports: + +VersionInfo = namedtuple('VersionInfo', 'major minor micro') +version_info = VersionInfo(major='0', minor='2', micro='0') diff --git a/src/bot_core/logging/__init__.py b/src/bot_core/logging/__init__.py index 425ab6c146..eafee46ff5 100644 --- a/src/bot_core/logging/__init__.py +++ b/src/bot_core/logging/__init__.py @@ -1 +1,26 @@ +# -*- coding: utf-8 -*- + +""" +bot Keksdose bot +~~~~~~~~~~~~~~~~~~~ + +Discord bot for the Keksdose discord Server + +:copyright: (c) 2022 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = 'bot_core.logging' +__author__ = 'Sven Heidemann' +__license__ = 'MIT' +__copyright__ = 'Copyright (c) 2022 sh-edraft.de' +__version__ = '0.2.0' + +from collections import namedtuple + + # imports + +VersionInfo = namedtuple('VersionInfo', 'major minor micro') +version_info = VersionInfo(major='0', minor='2', micro='0')