This program is a traditional hit counter.
$ docker build -t counter .
$ docker run -e "TZ=Asia/Tokyo" -p 8000:8000 -d --rm -it counter
$ curl localhost:8000/json
{"count":1}
$ curl localhost:8000/html
<!DOCTYPE html><html><head> ... </div></body></html>- Deploy and run this program on a web server.
- Add html embed code to your website.
<iframe src="http://[server]:[port]/html" width="150" height="20" frameborder="0">All options are provided with environment variables.
- TZ
timezone (default: "UTC") - IMAGE_WIDTH
image width (only html mode) - IMAGE_HEIGHT
image height (only html mode) - MIN_DIGITS
the number of digits (only html mode)
markdevel (markdevel [AT] outlook [.] com)