aggiornato il Dockerfile
aggiunti gli script per lanciarlo tramite container
This commit is contained in:
parent
b02fe14d57
commit
ae82c15f70
4 changed files with 48 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
FROM busybox:latest
|
#FROM busybox:latest
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
MAINTAINER Michele Fadda "<mikif70@gmail.com>"
|
MAINTAINER Michele Fadda "<mikif70@gmail.com>"
|
||||||
|
|
||||||
COPY lastlogin_mongodb /bin/lastlogin_mongodb
|
COPY lastlogin_mongodb-v4.1.1 /bin/lastlogin_mongodb
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/lastlogin_mongodb" ]
|
ENTRYPOINT [ "/bin/lastlogin_mongodb" ]
|
Binary file not shown.
17
Docker/run.sh
Normal file
17
Docker/run.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--rm \
|
||||||
|
-v /opt/llmongo/log:/data \
|
||||||
|
--name llmongo_tiscali \
|
||||||
|
--log-opt max-size=2m \
|
||||||
|
--log-opt max-file=5 \
|
||||||
|
mikif70/llmongo:4.1.1 \
|
||||||
|
-l /data/llmongo.log \
|
||||||
|
-p /data/llmongo.pid \
|
||||||
|
-r redis-ll.mail.tiscali.sys:6379 \
|
||||||
|
-m 10.39.80.189:27017 \
|
||||||
|
-d lastlogin \
|
||||||
|
-i enginedb1@10.39.109.107:8086 \
|
||||||
|
-T 60s \
|
||||||
|
$@
|
28
logrotate.cfg
Normal file
28
logrotate.cfg
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/opt/mongodb/mongod/log/*.log
|
||||||
|
{
|
||||||
|
daily
|
||||||
|
rotate 10
|
||||||
|
maxsize 10M
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
copytruncate
|
||||||
|
postrotate
|
||||||
|
/usr/bin/docker kill -s SIGUSR1 mongod 2> /dev/null || true
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
||||||
|
/opt/llmongo/log/*.log
|
||||||
|
{
|
||||||
|
daily
|
||||||
|
maxsize 5M
|
||||||
|
rotate 8
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
copytruncate
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue