rollback database logger path changes, rollback start script using yarn for staring instead of turbo to keep behaviour

This commit is contained in:
einhornimmond 2025-05-16 10:43:17 +02:00
parent 5ff8009df1
commit 3d8a66eeaa
4 changed files with 6 additions and 9 deletions

View File

@ -3,7 +3,6 @@
import { entities } from 'database' import { entities } from 'database'
import { Connection as DbConnection, FileLogger, createConnection } from 'typeorm' import { Connection as DbConnection, FileLogger, createConnection } from 'typeorm'
import path from 'node:path'
import { CONFIG } from '@/config' import { CONFIG } from '@/config'
export class Connection { export class Connection {
@ -39,7 +38,7 @@ export class Connection {
synchronize: false, synchronize: false,
logging: true, logging: true,
logger: new FileLogger('all', { logger: new FileLogger('all', {
logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH,
}), }),
extra: { extra: {
charset: 'utf8mb4_unicode_ci', charset: 'utf8mb4_unicode_ci',

View File

@ -307,12 +307,12 @@ else
fi fi
# start after building all to use up less ressources # start after building all to use up less ressources
pm2 start --name gradido-backend "turbo backend#start --env-mode=loose" -l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start" -l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
#pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -l $GRADIDO_LOG_PATH/pm2.frontend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' #pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -l $GRADIDO_LOG_PATH/pm2.frontend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
#pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' #pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save pm2 save
if [ ! -z $FEDERATION_DHT_TOPIC ]; then if [ ! -z $FEDERATION_DHT_TOPIC ]; then
pm2 start --name gradido-dht-node "turbo dht-node#start --env-mode=loose" -l $GRADIDO_LOG_PATH/pm2.dht-node.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 start --name gradido-dht-node "yarn --cwd $PROJECT_ROOT/dht-node start" -l $GRADIDO_LOG_PATH/pm2.dht-node.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save pm2 save
else else
log_step "=====================================================================" log_step "====================================================================="
@ -336,7 +336,7 @@ do
log_step "====================================================" log_step "===================================================="
log_step " start $MODULENAME listening on port=$FEDERATION_PORT" log_step " start $MODULENAME listening on port=$FEDERATION_PORT"
log_step "====================================================" log_step "===================================================="
pm2 start --name $MODULENAME "turbo federation#start --env-mode=loose" -l $GRADIDO_LOG_PATH/pm2.$MODULENAME.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 start --name $MODULENAME "yarn --cwd $PROJECT_ROOT/federation start" -l $GRADIDO_LOG_PATH/pm2.$MODULENAME.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
pm2 save pm2 save
done done

View File

@ -1,4 +1,3 @@
import path from 'node:path'
import { CONFIG } from '@/config' import { CONFIG } from '@/config'
// TODO This is super weird - since the entities are defined in another project they have their own globals. // TODO This is super weird - since the entities are defined in another project they have their own globals.
// We cannot use our connection here, but must use the external typeorm installation // We cannot use our connection here, but must use the external typeorm installation
@ -19,7 +18,7 @@ export const connection = async (): Promise<Connection | null> => {
synchronize: false, synchronize: false,
logging: true, logging: true,
logger: new FileLogger('all', { logger: new FileLogger('all', {
logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH,
}), }),
extra: { extra: {
charset: 'utf8mb4_unicode_ci', charset: 'utf8mb4_unicode_ci',

View File

@ -1,4 +1,3 @@
import path from 'node:path'
import { CONFIG } from '@/config' import { CONFIG } from '@/config'
// TODO This is super weird - since the entities are defined in another project they have their own globals. // TODO This is super weird - since the entities are defined in another project they have their own globals.
// We cannot use our connection here, but must use the external typeorm installation // We cannot use our connection here, but must use the external typeorm installation
@ -19,7 +18,7 @@ const connection = async (): Promise<Connection | null> => {
synchronize: false, synchronize: false,
logging: true, logging: true,
logger: new FileLogger('all', { logger: new FileLogger('all', {
logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), logPath: CONFIG.TYPEORM_LOGGING_RELATIVE_PATH,
}), }),
extra: { extra: {
charset: 'utf8mb4_unicode_ci', charset: 'utf8mb4_unicode_ci',