Automated deployment of go applications

I am wondering if there are any convenient ways to automate the deployment of code on a real server in GO, either standard built-in methods, or otherwise.

I need a google engine mechanism, like, I just run the command, and it loads onto the server and starts the restart.

(Ultimately, I want the git commit to trigger reconnection and redeployment, but that means there will be no track in the future)

+4
source share
1 answer

I recommend Travis CI + Heroku .

heroku git, Travis .

, :

?

  • Github
  • Travis ( github, , )
  • Heroku ( )

github :

  • .travis.yml( CI)
  • PROCFILE
  • .go-

Travis, .

( , ):

.travis.yml

language: go
go:
  - tip
deploy:
  provider: heroku
  buildpack: https://github.com/kr/heroku-buildpack-go.git
  api_key:
    secure: <your heroku api key encripted with travis encrypt>
  on: master 

PROCFILE

worker: your-app-binary

.go-Dir

your-app-binary

Procfile .go-dir heroku, -, heroku

- , .

Travis, ,

?

, Travis CI, , heroku, , build + deploy ;)

Travis Pull .

, , Travis build

+5

Source: https://habr.com/ru/post/1541847/


All Articles