main
Some checks failed
CI / build (push) Failing after 12m33s
Deploy Backend / build-and-deploy (push) Successful in 7s

This commit is contained in:
2026-02-07 01:17:44 +03:00
parent fc41428473
commit 3c360316ae
2 changed files with 6 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ jobs:
--restart unless-stopped \
--network gitea-server_gitea \
-p 1806:3000 \
-e DATABASE_URL='${{ secrets.DATABASE_URL }}' \
-e JWT_SECRET='${{ secrets.JWT_SECRET }}' \
-e DATABASE_URL="${{ secrets.DATABASE_URL }}" \
-e JWT_SECRET="${{ secrets.JWT_SECRET }}" \
-e REDIS_HOST='redis' \
-e REDIS_PORT='6379' \
skript-be

View File

@@ -22,8 +22,7 @@ interface PrismaDelegate {
@Injectable()
export class PrismaService
extends PrismaClient
implements OnModuleInit, OnModuleDestroy
{
implements OnModuleInit, OnModuleDestroy {
private readonly logger = new Logger(PrismaService.name);
constructor() {
@@ -37,9 +36,10 @@ export class PrismaService
}
async onModuleInit() {
const url = process.env.DATABASE_URL || '';
this.logger.log(
`Connecting to database... URL: ${process.env.DATABASE_URL?.split('@')[1]}`,
); // Mask password
`Connecting to database... Protocol: ${url.substring(0, 10)}... Host: ${url.split('@')[1] || 'N/A'}`,
); // Debug protocol while masking password
try {
await this.$connect();
this.logger.log('✅ Database connected successfully');