Simple application written in go
There are couple ways to build this application.
- Build on your local
- Build on CI/CD
docker build -t app:latest .
This will be controlled by Jenkins server and triggered by commit push in Github.
There are few test cases are in progress
- Heathcheck page,
/healthcheck
, return 200 in any request - Portal page,
/home
, return 401 in any illegal character that found in path.
docker run --name app -p 3000:3000 app:latest
It should be managed by Jenkins pipeline with proper network, storage, and resources control.
docker-compose apply
Please refer to this repo, Terraform powered Docker Swarm cluster.
Start from separated VPC, Subnet, Internet gateway or NAT gateway to Lambda backup, Docker Swarm, and private docker registry. Grafana, prometheus, and ELK included. Rexray dynamic storage plugin ready.
There are couple additional files in this repo.
- Dockerfile, build docker image from scratch and have a optimized final image. (1/8 of original image)
- Jenkinsfile, demonstrate how to build/deploy and control flow in Jenkins
- docker-compose.yaml, define resource requirement in docker swarm cluster