Docker: 创建 staging 环境

本文件是使用 GitHub Actions 部署指南的一部分。您可以在这里查看完整指南:了解如何通过 GitHub Actions 部署您的 Docker 容器

👋 欢迎来到 Stackhero 文档!

Stackhero 提供现成的 Docker 云 CaaS (Containers as a Service) 解决方案,具有众多优势,包括:

  • 只需一个 docker-compose up,即可轻松将您的容器部署到生产环境
  • 使用 HTTPS 保护的可定制域名(例如,https://api.your-company.comhttps://www.your-company.comhttps://backoffice.your-company.com)。
  • 专用私有 VM提供的最佳性能强大安全性
  • 只需点击即可轻松更新

节省时间简化您的生活:只需 5 分钟即可尝试 Stackhero 的 Docker CaaS 云托管 解决方案,并将您的容器部署到生产环境!

staging 环境的配置步骤与 production 环境相同。只需重复上述流程,将 production 替换为 staging 即可。

然后,通过以下命令创建 staging 分支:

git checkout -b staging

并将 staging 分支推送到 GitHub:

git push --set-upstream origin staging

完成后,GitHub Actions 会自动将 staging 分支部署到指定的 staging Docker 实例。