Sign inSign up

d7561985/logger

By d7561985

•Updated over 8 years ago

Image
0

166

d7561985/logger repository overview

Used OS env for configure server: WEB_PORT - optional listened restAPI http webserver port. default: 8080 WEB_COMPRESSION - optional enable compression for web. default: 1 Val: 0 or 1 MONGO_ADDRES - optional mongodb addresss. default: 127.0.0.1 MONGO_PORT - optional mongodb port. default: 27017 MONGO_USER - optional if used --auth option of mongodb. Require set MONGO_PSW too. MONGO_PSW - optional if used --auth option of mongodb.

How to launch:

with default variables. docker run --rm --name log_daemon -p 8080:8080 --net="host" d7561985/logger:0.1

with listening 8888 port docker run -e WEB_PORT=8888 --rm --name log_daemon -p 8888:8888 --net="host" d7561985/logger:0.1

with 8888 port + mongo auth user&psw docker run -e WEB_PORT=8888 -e MONGO_USER=root -e MONGO_PSW=secret_psw --rm --name log_daemon -p 8888:8888 --net="host" d7561985/logger:0.1

Warning! on host rest port should be protected by additional tools for preventing send request not authorized users.

Rest structure: type LogStruct struct{ content string db string tag string timestamp int }

type RequestForm struct{ mdb string mtable string log LogStruct }

Example rest request: {"mdb":"test","mtable":"tolog","log":{"content":"{"wqweqweqwe": 123}","db":"database_log_name","tag":"OOO","timestamp":16363600}}

Tag summary

Content type

Image

Digest

Size

4.5 MB

Last updated

over 8 years ago

docker pull d7561985/logger:0.1