From cce7fb0bf5c0877a986136677c78f0907a2bab4c Mon Sep 17 00:00:00 2001 From: JudLup Luna Date: Sun, 2 Jun 2024 01:17:52 -0500 Subject: [PATCH] . --- .github/workflows/deploy.yml | 2 +- docker-compose.yml | 2 +- src/modules/typeorm/db.module.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3ec53a4..4b8490d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,7 +34,7 @@ jobs: SSHPASS: ${{ secrets.EC2_KEY }} run: | sshpass -e ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF' - export NODE_ENV=prod + export NODE_ENV=dev # Clonar el repositorio en una ruta especĂ­fica git clone https://github.com/Trycatch-tv/ValidadorBootcamp-backend /home/${{ secrets.EC2_USER }}/app diff --git a/docker-compose.yml b/docker-compose.yml index 47f769a..066bdc5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: - DATABASE_NAME=validador_bootcamps - FILE_SERVICE_URL=http://localhost:3000/files - REVIEW_SERVICE_URL=http://localhost:3000/reviews - - NODE_ENV=prod + - NODE_ENV=dev networks: - vnet-backend depends_on: diff --git a/src/modules/typeorm/db.module.ts b/src/modules/typeorm/db.module.ts index 4b92ad9..15ffdd3 100644 --- a/src/modules/typeorm/db.module.ts +++ b/src/modules/typeorm/db.module.ts @@ -23,7 +23,9 @@ import { EnvironmentConfigModule } from '../environment-config/environment-confi password: environmentConfigService.DATABASE_PASSWORD, database: environmentConfigService.DATABASE_NAME, autoLoadEntities: true, - synchronize: true, + synchronize: + environmentConfigService.NODE_ENV === + ('dev' satisfies EnvironmentConfig['NODE_ENV']), } as TypeOrmModuleOptions; }, }),