Improved dev stack #70

This commit is contained in:
Sven Heidemann 2022-10-23 15:32:03 +02:00
parent a685ab9e06
commit 25a6758c40
6 changed files with 79 additions and 12 deletions

View File

@ -20,7 +20,7 @@ services:
restart: 'no' restart: 'no'
ports: ports:
- '8044:80' - '8044:80'
command: bash /app/bot/bot -stage command: bash /app/bot/bot -dev
kdb_web_dev_1: kdb_web_dev_1:
image: kdb-web/kdb-web:0.3 image: kdb-web/kdb-web:0.3

View File

@ -6,44 +6,61 @@
"DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S" "DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S"
}, },
"LoggingSettings": { "LoggingSettings": {
"Path": "logs/", "Path": "logs/$date_now/",
"Filename": "bot.log", "Filename": "bot.log",
"ConsoleLogLevel": "DEBUG", "ConsoleLogLevel": "DEBUG",
"FileLogLevel": "DEBUG" "FileLogLevel": "TRACE"
}, },
"BotLoggingSettings": { "BotLoggingSettings": {
"Command": { "Api": {
"Path": "logs/", "Path": "logs/",
"Filename": "api.log",
"ConsoleLogLevel": "DEBUG",
"FileLogLevel": "TRACE"
},
"Command": {
"Path": "logs/$date_now/",
"Filename": "commands.log", "Filename": "commands.log",
"ConsoleLogLevel": "DEBUG", "ConsoleLogLevel": "DEBUG",
"FileLogLevel": "DEBUG" "FileLogLevel": "TRACE"
}, },
"Database": { "Database": {
"Path": "logs/", "Path": "logs/$date_now/",
"Filename": "database.log", "Filename": "database.log",
"ConsoleLogLevel": "DEBUG", "ConsoleLogLevel": "DEBUG",
"FileLogLevel": "DEBUG" "FileLogLevel": "DEBUG"
}, },
"Message": { "Message": {
"Path": "logs/", "Path": "logs/$date_now/",
"Filename": "message.log", "Filename": "message.log",
"ConsoleLogLevel": "DEBUG", "ConsoleLogLevel": "DEBUG",
"FileLogLevel": "DEBUG" "FileLogLevel": "TRACE"
} }
}, },
"DiscordBot": {
"Token": "OTk4MTU5NjczODkzMDYwNzM4.GN3QyA.yvWO6L7Eu36gXQ7ARDs0Jg2J1VqIDnHLou5lT4",
"Prefix": "!kd "
},
"Translation": { "Translation": {
"DefaultLanguage": "de", "DefaultLanguage": "de",
"Languages": [ "Languages": [
"de" "de"
] ]
}, },
"DiscordBot": { "DatabaseSettings": {
"Token": "OTk4MTU5NjczODkzMDYwNzM4.GN3QyA.yvWO6L7Eu36gXQ7ARDs0Jg2J1VqIDnHLou5lT4", "Host": "kdb_db_dev_1",
"Prefix": "!kd " "User": "kd_kdb",
"Password": "a2Rfa2Ri",
"Database": "kd_kdb",
"Port": "3306",
"Charset": "utf8mb4",
"UseUnicode": "true",
"Buffered": "true",
"AuthPlugin": "mysql_native_password"
}, },
"Bot": { "Bot": {
"910199451145076828": { "910199451145076828": {
"MessageDeleteTimer": 6 "MessageDeleteTimer": 4
}, },
"Technicians": [ "Technicians": [
240160344557879316, 240160344557879316,

View File

@ -1,4 +1,29 @@
{ {
"Api": {
"Port": 80,
"Host": "0.0.0.0",
"RedirectToHTTPS": false
},
"Authentication": {
"SecretKey": "RjNiNUxEeisjSnZ6Zz1XIUBnc2EleHNG",
"Issuer": "http://localhost:8044",
"Audience": "http://localhost:8043",
"TokenExpireTime": 1,
"RefreshTokenExpireTime": 7
},
"DiscordAuthentication": {
"ClientSecret": "cmhqYmF4MXBCd2IzeEZoSXRZQ29vY3NwUWwxQzFTZng=",
"RedirectURL": "http://localhost:8043/auth/register",
"Scope": [
"identify",
"email"
],
"TokenURL": "https://discordapp.com/api/oauth2/token",
"AuthURL": "https://discordapp.com/api/oauth2/authorize"
},
"Frontend": {
"URL": "http://localhost:8043/"
},
"EMailClientSettings": { "EMailClientSettings": {
"Host": "mail.sh-edraft.de", "Host": "mail.sh-edraft.de",
"Port": "587", "Port": "587",

View File

@ -16,10 +16,12 @@
"PostBuild": { "PostBuild": {
"KeepConfigs": [ "KeepConfigs": [
"appsettings.json", "appsettings.json",
"appsettings.development.json",
"appsettings.staging.json", "appsettings.staging.json",
"appsettings.production.json", "appsettings.production.json",
"feature-flags.json", "feature-flags.json",
"apisettings.json", "apisettings.json",
"apisettings.development.json",
"apisettings.staging.json", "apisettings.staging.json",
"apisettings.production.json" "apisettings.production.json"
], ],

View File

@ -66,6 +66,12 @@
] ]
}, },
"development": { "development": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
],
"buildOptimizer": false, "buildOptimizer": false,
"optimization": false, "optimization": false,
"vendorChunk": true, "vendorChunk": true,

View File

@ -0,0 +1,17 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
apiURL: "http://localhost:8044",
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.