lordakp.blogg.se

How to set up bitbucket digital ocean
How to set up bitbucket digital ocean











how to set up bitbucket digital ocean

The Makefile contains quite a few different pieces but I'll drop in only the relevant ones. RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o /app/appname. # If you have static assets like templates It's super light and secure, and the images are tiny. This is the default Dockerfile I use for Go applications. At the application level, we need two main files: Dockerfile and Makefile. This involves a few pieces behind the scenes. Monitored kubernetes for success/failure.New containers created using the new version.Kubernetes manifests updated using the latest version.Docker image pushed to private docker repository and tagged with a version number set in code.I wanted the following to happen when I pushed code to the master branch: Throughout this post it is assumed that the application name is "appname" and the namespace is also "appname". There is no blue/green deployment or anything else that fancy. Note: this is a very simple approach, it just tests, builds and deploys and effectively hopes for the best. This took longer than I was expecting, so I will detail what I did in this post both for whoever needs it as well as my future self. I spent a bit of time rebuilding a small Go application recently and I wanted to implement an easy test, build, deploy pipeline to a Kubernetes instance I have on Digital Ocean.













How to set up bitbucket digital ocean