- 到 .env 檔設定基本環境
- docker-compose up -d
- cd nuxt-app
- yarn && yarn dev
- 專案啟動在 nuxt localhost:3000, wordpress localhost:9000/wp-admin
sh dump.sh
將 docker VM 的 DB 資料匯出至/db/default/wp.sql
- stash 未commit的檔案後切換至
deploy
分支 - rebase
deploy
至master
- 確認於
deploy
分支下yarn build
- commit
/.output
所有檔案 - 連線主機
- 於專案資料夾下
/project-name
輸入git reset --hard origin/deploy
、git pull origin deploy
- 開啟
pm2
可以先pm2 delete project-name
,或者直接pm2 restart project-name
- 沒有開過
pm2
則cd /project-name/nuxt-app
輸入pm2 start --env prod
- feat: 新增/修改功能 (feature)。
- fix: 修補 bug (bug fix)。
- docs: 文件,增加說明 (documentation)。
- backup: 備份。EX: SQL檔案
- data: 資料變化。EX:圖片、固定文案、動態資料
- style: 格式 (不影響程式碼運行的變動 white-space, formatting, missing semi colons, etc)。
- refactor: 重構 (既不是新增功能,也不是修補 bug 的程式碼變動)。
- perf: 改善效能 (A code change that improves performance)。
- test: 增加測試 (when adding missing tests)。
- chore: 建構程序或輔助工具的變動 (maintain)。
- revert: 撤銷回覆先前的 commit 例如:revert: type(scope): subject (回覆版本:xxxx)。
- deploy: 部署相關檔案