Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: CICD test
Browse files Browse the repository at this point in the history
SeongHyeon0409 committed Nov 6, 2024
1 parent 51cdd89 commit eb8fff6
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ jobs:
- name: make deploy environment
run: |
echo {{secrets.DEPLOY_ENV}} > .env.production
echo {{secrets.DEPLOY_ENV}} > .env
- name: Send files & deploy script
uses: appleboy/scp-action@master
@@ -66,7 +66,7 @@ jobs:
cd /corinee
docker-compose down
docker-compose up -d
rm -rf .env.production docker-compose.yml
rm -rf .env docker-compose.yml
- name: Generate Error Report
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -14,4 +14,5 @@

#!.yarn/cache
.pnp.*
.env.*
.env.*
.env
22 changes: 13 additions & 9 deletions packages/server/src/configs/typeorm.config.ts
Original file line number Diff line number Diff line change
@@ -3,22 +3,26 @@ import { config } from 'dotenv';
import { resolve } from 'path';
import { createTunnel } from 'tunnel-ssh';

const env = process.env.NODE_ENV || 'development';
const envFileName = `.env.${env}`; //.env.production
// .env
const envPath = resolve(process.cwd(), '..', '..', envFileName);
console.log(env);
console.log(envPath);
console.log(process.env.NODE_ENV);
// const env = process.env.NODE_ENV || 'development';
// const envFileName = `.env.${env}`; //.env.production
// // .env
// const envPath = resolve(process.cwd(), '..', '..', envFileName);
// console.log(env);
// console.log(envPath);
// console.log(process.env.NODE_ENV);


// config({ path: envPath });

config({ path: envPath });
config();

const env = process.env.NODE_ENV || 'development';

export default async function getTypeOrmConfig(): Promise<TypeOrmModuleOptions> {
if (env === 'production') {
console.log('배포 환경에서 데이터베이스에 직접 연결합니다.');
console.log(env);
console.log(envPath);
// console.log(envPath);
console.log(process.env.NODE_ENV);
console.log(process.env.DB_HOST);
return {

0 comments on commit eb8fff6

Please sign in to comment.