Skip to content
uihyeon.cha edited this page Mar 3, 2020 · 1 revision

배포 (Deployment)

배포를 위한 설정파일은 {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

Deploy Config Property

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

빌드용 git에 push

npm run publish [serverName]

Remote 서버에 디렉토리 생성

첫 배포시 서버에 파일을 생성하기 위해 아래의 명령을 실행해야 합니다.

이 과정에서 GIT SSH Key 인증관련 오류가 발생할 수 있습니다. SSH Key 설정 방법은 Connecting to GitHub with SSH 이 사이트를 참고하거나 스스로 해결해주세요.

npm run remote [serverName] -- setup
npm run remote [serverName] -- setup --force

Remote 서버에 배포

npm run remote
npm run remote [serverName]
npm run remote [serverName] -- --force

Link

Wiki

미리보기

소개 및 기술 스택

Guides

Project Structure
프로젝트 구조

Installation
설치

Settings
설정

Commands
명령어들

Deployment
배포

Page rules
페이지 규칙

React Hooks API

Review

Beta (v0.1.3)

Clone this wiki locally