main
This commit is contained in:
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user