Skip to content

Commit 394d29c

Browse files
authored
Merge pull request #99 from umc-commit/feat/98-dev/pro
[FEAT] 환경 변수 분리 및 프로덕션 설정 추가
2 parents a06bdc5 + fac5d1f commit 394d29c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
After=network.target
6060
6161
[Service]
62+
Environment=NODE_ENV=production
6263
User=ubuntu
6364
ExecStart=/usr/bin/npm run start --prefix /opt/app/
6465
Restart=always

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import { prisma } from "./db.config.js";
1717
import path from "path";
1818

1919

20-
dotenv.config();
20+
dotenv.config({
21+
path: process.env.NODE_ENV === 'production' ? '.env.production' : '.env'
22+
});
2123

2224
passport.use("google", googleStrategy);
2325
passport.use("kakao", kakaoStrategy);

0 commit comments

Comments
 (0)