Added flask support #70 #75 #71

Merged
edraft merged 107 commits from #70 into 0.3 2022-11-05 13:55:42 +01:00
59 changed files with 135 additions and 70 deletions
Showing only changes of commit e31c5472af - Show all commits

View File

@ -0,0 +1,46 @@
version: "3.9"
volumes:
kdb_bot_staging_1:
kdb_web_staging_1:
kdb_db_staging_1:
services:
kdb_bot_staging_1:
image: kdb-bot/kdb-bot:0.3
container_name: kdb_staging_1
depends_on:
- kdb_db_staging_1
volumes:
- kdb_bot_staging_1:/app
environment:
KDB_ENVIRONMENT: "staging"
KDB_TOKEN: "OTk4MTU5ODAyMzkzOTY0NTk0.G4rLkF.uBQ9pW8X1Lm5agHqvBfzf7qEf8Ton-3a1oJPmY"
KDB_PREFIX: "!kt "
restart: 'no'
kdb_web_staging_1:
image: kdb-web/kdb-web:0.3
container_name: kdb_web_staging_1
depends_on:
- kdb_bot_staging_1
volumes:
- kdb_web_staging_1:/app
restart: 'no'
ports:
- '8043:80'
kdb_db_staging_1:
image: mysql:latest
container_name: kdb_db_staging_1
command: mysqld --default-authentication-plugin=mysql_native_password
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: "kd_kdb"
MYSQL_USER: "kd_kdb"
MYSQL_PASSWORD: "kd_kdb"
MYSQL_DATABASE: "kd_kdb"
ports:
- "3308:3306"
volumes:
- kdb_db_staging_1:/var/lib/mysql

View File

@ -1,18 +1,18 @@
version: "3.9"
volumes:
kdb_prod_1:
kdb_bot_prod_1:
kdb_web_prod_1:
kdb_db_1:
kdb_db_prod_1:
services:
kdb_prod_1:
image: kdb/kdb:0.3
container_name: kdb_prod_1
kdb_bot_prod_1:
image: kdb-bot/kdb-bot:0.3
container_name: kdb_bot_prod_1
depends_on:
- kdb_db_1
- kdb_db_prod_1
volumes:
- kdb_prod_1:/app
- kdb_bot_prod_1:/app
environment:
KDB_ENVIRONMENT: "production"
KDB_TOKEN: ""
@ -20,19 +20,19 @@ services:
restart: 'no'
kdb_web_prod_1:
image: kdb/kdb-web:0.3
image: kdb-web/kdb-web:0.3
container_name: kdb_web_prod_1
depends_on:
- kdb_prod_1
- kdb_bot_prod_1
volumes:
- kdb_web_prod_1:/app
restart: 'no'
ports:
- '8042:80'
kdb_db_1:
kdb_db_prod_1:
image: mysql:latest
container_name: kdb_db_1
container_name: kdb_db_prod_1
command: mysqld --default-authentication-plugin=mysql_native_password
restart: unless-stopped
environment:
@ -43,4 +43,4 @@ services:
ports:
- "3307:3306"
volumes:
- kdb_db_1:/var/lib/mysql
- kdb_db_prod_1:/var/lib/mysql

View File

@ -1,12 +1,18 @@
# syntax=docker/dockerfile:1
FROM python:3.10.7-bullseye
FROM python:3.10.4-alpine
WORKDIR /app
COPY ./dist/bot/build/ .
RUN python -m pip install --upgrade pip
RUN apk update
RUN apk add --update alpine-sdk linux-headers
RUN apk add bash
RUN apk add nano
RUN pip install -r requirements.txt --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 "

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot'
__title__ = 'bot'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -12,6 +12,12 @@
"FileLogLevel": "INFO"
},
"BotLoggingSettings": {
"Api": {
"Path": "logs/",
"Filename": "api.log",
"ConsoleLogLevel": "ERROR",
"FileLogLevel": "INFO"
},
"Command": {
"Path": "logs/$date_now/",
"Filename": "commands.log",
@ -38,7 +44,7 @@
]
},
"DatabaseSettings": {
"Host": "kdb_db_1",
"Host": "kdb_db_prod_1",
"User": "kd_kdb",
"Password": "a2Rfa2Ri",
"Database": "kd_kdb",

View File

@ -12,6 +12,12 @@
"FileLogLevel": "DEBUG"
},
"BotLoggingSettings": {
"Api": {
"Path": "logs/",
"Filename": "api.log",
"ConsoleLogLevel": "INFO",
"FileLogLevel": "DEBUG"
},
"Command": {
"Path": "logs/$date_now/",
"Filename": "commands.log",
@ -38,7 +44,7 @@
]
},
"DatabaseSettings": {
"Host": "kdb_db_2",
"Host": "kdb_db_staging_1",
"User": "kd_kdb",
"Password": "a2Rfa2Ri",
"Database": "kd_kdb",

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api'
__title__ = 'bot_api'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.abc'
__title__ = 'bot_api.abc'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.configuration'
__title__ = 'bot_api.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.controller'
__title__ = 'bot_api.controller'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.controller.discord'
__title__ = 'bot_api.controller.discord'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.event'
__title__ = 'bot_api.event'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.exception'
__title__ = 'bot_api.exception'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.filter'
__title__ = 'bot_api.filter'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.filter.discord'
__title__ = 'bot_api.filter.discord'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.logging'
__title__ = 'bot_api.logging'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.mail'
__title__ = 'bot_api.mail'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.model'
__title__ = 'bot_api.model'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.model.discord'
__title__ = 'bot_api.model.discord'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.route'
__title__ = 'bot_api.route'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.service'
__title__ = 'bot_api.service'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_api.transformer'
__title__ = 'bot_api.transformer'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core'
__title__ = 'bot_core'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.abc'
__title__ = 'bot_core.abc'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.configuration'
__title__ = 'bot_core.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.core_extension'
__title__ = 'bot_core.core_extension'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.events'
__title__ = 'bot_core.events'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.helper'
__title__ = 'bot_core.helper'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.logging'
__title__ = 'bot_core.logging'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.pipes'
__title__ = 'bot_core.pipes'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_core.service'
__title__ = 'bot_core.service'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_data'
__title__ = 'bot_data'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_data.abc'
__title__ = 'bot_data.abc'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_data.migration'
__title__ = 'bot_data.migration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_data.model'
__title__ = 'bot_data.model'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.bot_data.service'
__title__ = 'bot_data.service'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.admin'
__title__ = 'modules.admin'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.admin.command'
__title__ = 'modules.admin.command'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.auto_role'
__title__ = 'modules.auto_role'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.auto_role.command'
__title__ = 'modules.auto_role.command'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.auto_role.events'
__title__ = 'modules.auto_role.events'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.auto_role.helper'
__title__ = 'modules.auto_role.helper'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base'
__title__ = 'modules.base'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base.abc'
__title__ = 'modules.base.abc'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base.command'
__title__ = 'modules.base.command'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base.configuration'
__title__ = 'modules.base.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base.events'
__title__ = 'modules.base.events'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.base.service'
__title__ = 'modules.base.service'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.boot_log'
__title__ = 'modules.boot_log'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.boot_log.configuration'
__title__ = 'modules.boot_log.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.database'
__title__ = 'modules.database'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.moderator'
__title__ = 'modules.moderator'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.moderator.command'
__title__ = 'modules.moderator.command'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.permission'
__title__ = 'modules.permission'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.permission.abc'
__title__ = 'modules.permission.abc'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.permission.configuration'
__title__ = 'modules.permission.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.permission.events'
__title__ = 'modules.permission.events'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -11,7 +11,7 @@ Discord bot for the Keksdose discord Server
"""
__title__ = 'kdb-bot.modules.permission.service'
__title__ = 'modules.permission.service'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2022 sh-edraft.de'

View File

@ -18,6 +18,7 @@
"appsettings.json",
"appsettings.staging.json",
"appsettings.production.json",
"feature-flags.json",
"apisettings.json",
"apisettings.staging.json",
"apisettings.production.json"