英文:
Golang App Deployment
问题
我即将完成我的应用程序,并希望将其部署在私有服务器上。我希望能够自动完成以下几个任务:
- 运行 Go 测试
- 打包应用程序
- 在服务器上部署应用程序
- 具备回滚功能
如何轻松地实现这些功能以适用于 Go 应用程序?
英文:
I am about to finish my app and I want to deploy it on a private server. I want to be able to do the following things automatically:
- run the go tests
- package the app
- deploy it in the server
- have the ability to roll back
How do I accomplish this easily for a go app?
答案1
得分: 2
我个人在应用部署方面使用的是基于Python的Fabric,而在服务器管理方面使用的是Chef。问题是,由于Go的构建产物只是一个大的二进制文件,部署工具并不是很重要,构建过程更为重要。
我只是将Go的二进制文件打包成tar.gz格式,并通过Fabric将它们发送到服务器上。我从未使用过Capistrano,但根据我所了解,它似乎非常适合部署Go应用程序。
英文:
Personally I'm using Fabric (python based) for app deployments, and Chef for server management. The thing is, since Go's artifacts are just one big binary, the deployer doesn't matter much, the build process is more important.
I'm just packing Go binaries as tar.gz's and sending them to the server with Fabric. I've never used Capistrano but from what I've read it looks perfect for deploying Go apps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论