This is a simple Go application that exposes a REST endpoint and returns a JSON payload.
This section is for building the application in a docker container on your machine.
The Github pipelines will build the container when a release is trigger.
git clone https://github.com/crushten/go_endpoint_cloud
.go_endpoint_cloud
directory: cd go_endpoint_cloud/application
.docker build -t go_endpoint_cloud:dev .
.This is for building the application locally on your machine.
git clone https://github.com/crushten/go_endpoint_cloud
.go_endpoint_cloud
directory: cd go_endpoint_cloud/application
.go build .
.There is also a go_build.sh
script that will output binaries for Linux, Windows, and Mac for amd64 and arm64.
To use the script just run it: ./go_build.sh
.
This application can be deployed as a Golang binary or in a Docker container. The Github pipelines will build binaries for MacOS, Linux and Windows. In addition it will build Linux container images for ARM64 and x86_64 architectures.
Terraform can be used to deploy the application to cloud infrastructure.
The Terraform EKS Deploy is an example of this.
Can build the project locally to output the binaries and Docker containers. Can also run Goreleaser locally to output all of the artifacts.
This section covers testing the application locally. The Github pipelines will test the application when pushed.
This is for testing the application locally on your machine.
git clone https://github.com/crushten/go_endpoint_cloud
.go_endpoint_cloud
directory: cd go_endpoint_cloud/application
.GIN_MODE=release go test -v
.GIN_MODE=release go test -cover
.