Skip to content

Commit 9d554c6

Browse files
se030wcho21
andauthored
Chore/#247-K: 서버 디렉토리 vite로 빌드 및 배포 스크립트 수정 (#258)
* chore: 서버 빌드 위한 vite-plugin-node와 설정 추가 * chore: 사용하지 않는 모듈 삭제 * chore: CD 스크립트에서 클린업 제거 기존 서버 빌드가 @wabinar 폴더에 생성하던 트랜스파일 결과물을 삭제하는 스크립트를 제거 * chore: 배포 스크립트 수정 npm -w 옵션 활용해서 root directory에서 클라이언트, 서버 빌드 * refactor: 배포 스크립트 파일로 분리 * fix: npm run env 추가 * fix: cd deploy-scripts 제거 * fix: 삭제했던 경로 환경변수 추가 * fix: npm run env 삭제 * chore: dotenv production pull 스크립트 추가 기존 npm run env는 development dotenv를 가져오고 있었음 Co-authored-by: W. Cho <[email protected]>
1 parent 7f43e13 commit 9d554c6

16 files changed

+419
-227
lines changed

@wabinar/api-types/tsconfig.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

@wabinar/crdt/tsconfig.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

client/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
"stylelint": "^14.15.0",
3232
"stylelint-config-prettier-scss": "^0.0.1",
3333
"stylelint-config-property-sort-order-smacss": "^9.0.0",
34-
"stylelint-config-recommended-scss": "^8.0.0",
35-
"vite": "^3.2.3",
36-
"vite-tsconfig-paths": "^3.5.2"
34+
"stylelint-config-recommended-scss": "^8.0.0"
3735
}
3836
}

deploy-scripts/build-backend.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
source ./config.sh # 프로젝트 디렉토리 환경변수 설정
3+
4+
cd ${PROJECT_BASE_DIR}
5+
git pull origin main
6+
7+
npm ci
8+
npm run deploy # main 브랜치 빌드

deploy-scripts/build-frontend.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

deploy-scripts/pre-build.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
source ./config.sh
3+
4+
cd ${FRONTEND_DIR}
5+
npx dotenv-vault pull production .env
6+
7+
cd ${BACKEND_DIR}
8+
npx dotenv-vault pull production .env
9+
10+
echo "production dotenv pulled successfully"

deploy-scripts/try-dotenv-vault-login.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
source ./config.sh
3-
43
source ${VAULT_KEY_FILE}
54

65
cd ${FRONTEND_DIR}

deploy.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
cd deploy-scripts
3-
(source try-dotenv-vault-login.sh)
4-
(source pre-build.sh)
5-
(source build-frontend.sh)
6-
(source build-backend.sh)
3+
(source try-dotenv-vault-login.sh) # dotenv-vault 사용을 위한 로그인
4+
(source pull-production-dotenv.sh)
5+
(source build-frontend-and-backend.sh) # 배포 스크립트

0 commit comments

Comments
 (0)