Categorygithub.com/ShadowUser17/test-web-server
module
0.0.0-20241101100636-6ebb1e454a94
Repository: https://github.com/shadowuser17/test-web-server.git
Documentation: pkg.go.dev

# README

Dependencies:

Validate project files:

golangci-lint run

Build binary file:

go mod tidy
go build -ldflags="-s -w" -o ./server ./cmd/main.go

Build docker image:

  • Prune build cache:
earthly prune
  • Build stable version:
earthly +all --tag="latest"
  • Build testing version:
earthly +all --tag="testing"

Scan docker image:

dockle "shadowuser17/test-web-server:testing"
trivy image "shadowuser17/test-web-server:testing"

Publish docker image:

docker login -u "${DOCKERHUB_LOGIN}" -p "${DOCKERHUB_TOKEN}"
earthly --push +all --tag="latest"
earthly --push +all --tag="testing"

Deploy to K8S:

kubectl create ns testing
kubectl apply -f k8s/deploy.yml -n testing
kubectl apply -f k8s/network.yml -n testing
kubectl apply -f k8s/ingress.yml -n testing
kubectl apply -f k8s/probes.yml -n testing
kubectl apply -f k8s/monitoring.yml -n testing
kubectl apply -f k8s/alertmanager.yml -n testing

# Packages

No description provided by the author