Docker: 建立 staging 環境
本文件是使用 GitHub Actions 部署指南的一部分。請在此處查看完整指南:學習如何透過 GitHub Actions 部署您的 Docker 容器。
👋 歡迎來到 Stackhero 文件!
Stackhero 提供一個即用型的 Docker cloud CaaS (Containers as a Service) 解決方案,帶來多種優勢,包括:
- 只需
docker-compose up即可輕鬆將您的容器部署到生產環境。- 使用 HTTPS 保護的可自訂域名(例如,https://api.your-company.com,https://www.your-company.com,https://backoffice.your-company.com)。
- 由專用私有 VM提供的最佳性能和強大的安全性。
- 只需點擊即可輕鬆更新。
節省時間並簡化您的生活:只需 5 分鐘即可嘗試 Stackhero 的 Docker CaaS cloud hosting 解決方案,並將您的容器部署到生產環境!
staging 環境的設定步驟與 production 相同。只需重複上述流程,將 production 替換為 staging 即可。
接著,建立 staging 分支:
git checkout -b staging
並將 staging 分支推送到 GitHub:
git push --set-upstream origin staging
完成後,GitHub Actions 會自動將您的 staging 分支部署到指定的 Docker 實例。