-
Notifications
You must be signed in to change notification settings - Fork 3
Deployment
uihyeon.cha edited this page Mar 3, 2020
·
1 revision
배포를 위한 설정파일은 {workspace}/configs/deploy
폴더에 있습니다. 설정파일 만드는 방법은 Settings 내용을 참고해주세요.
기본적으로 main.env.example
, sub.env.example
2개의 예제 파일이 있는데, 사용할 서버의 개수에 따라 자유롭게 추가하거나 삭제할 수 있습니다.
📌 여기서 추가한 파일명이
serverName
이 됩니다.
configs/
┗ deploy
┣ main.env.example
┣ sub.env.example
+ ┣ main.env
+ ┣ sub.env
+ ┣ backup.env
+ ┗ [serverName].env
name | description | example |
---|---|---|
LADDER_DEPLOY_SSH_KEY | 원격연결에 사용할 ssh key | |
LADDER_DEPLOY_USER | 원격연결에 사용할 username | |
LADDER_DEPLOY_HOST | host | |
LADDER_DEPLOY_PATH | 배포할 서버상 경로 (반드시 절대경로로 입력) | /var/www/ladder-game |
LADDER_DEPLOY_REMOTE | git remote name | origin |
LADDER_DEPLOY_BRANCH | git branch name | master |
LADDER_DEPLOY_REPO | 서버에서 pull 받을 build용 git 주소 | git@github.com:divlook/ladder-game-build.git |
npm run build
npm run publish [serverName]
첫 배포시 서버에 파일을 생성하기 위해 아래의 명령을 실행해야 합니다.
이 과정에서 GIT SSH Key 인증관련 오류가 발생할 수 있습니다. SSH Key 설정 방법은 Connecting to GitHub with SSH 이 사이트를 참고하거나 스스로 해결해주세요.
npm run remote [serverName] -- setup
npm run remote [serverName] -- setup --force
npm run remote
npm run remote [serverName]
npm run remote [serverName] -- --force