https://github.com/s0rg/microapp
minimal dockerized application
https://github.com/s0rg/microapp
docker example go golang
Last synced: 9 months ago
JSON representation
minimal dockerized application
- Host: GitHub
- URL: https://github.com/s0rg/microapp
- Owner: s0rg
- License: mit
- Created: 2020-02-27T19:35:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-16T11:13:00.000Z (over 3 years ago)
- Last Synced: 2025-03-30T13:34:07.044Z (10 months ago)
- Topics: docker, example, go, golang
- Language: Makefile
- Homepage:
- Size: 5.86 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# microapp
minimal dockerized application example with 2-staged dockerfiles (scratch and distroless versions)
# workflow
* build stand-alone binary: `make build`
* build docker with `scratch`-based image: `make docker-scratch`
* build docker with `distroless`-based image: `make docker-distroless`
# environment config
`ADDR` - address for the server to listen on (default is 0.0.0.0:8080)
# usage
`docker run s0rg/microapp-scratch` or `docker run s0rg/microapp-distroless`
application serves two endpoints:
* `/` - returns string with application host and user names
* `/health` - returns HTTP 204 if app serves well
it can be used in docker-compose environments as load-balancing
testing utility.
# license
MIT