1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

add monit

This commit is contained in:
kev 2015-07-02 18:59:58 +08:00
parent a5fd9fefcd
commit a98eb0ccd9
5 changed files with 67 additions and 0 deletions

16
monit/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
#
# Dockerfile for monit
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
RUN apk add -U monit \
&& rm -rf /var/cache/apk/*
COPY monit /etc/monit
VOLUME /etc/monit /var/lib/monit
EXPOSE 2812
CMD ["monit", "-I", "-c", "/etc/monit/monitrc"]

31
monit/README.md Normal file
View File

@ -0,0 +1,31 @@
monit
=====
`Monit` is a utility for managing and monitoring processes, programs, files,
directories and filesystems on a Unix system.
## docker-compose.yml
```
monit:
image: vimagick/monit
volumes:
- monit:/etc/monit
pid: host
net: host
restart: always
```
## server
```
$ cd ~/fig/monit/
$ docker-compose up -d
$ docker exec monit_monit_1 monit status
```
## client
```
$ firefox http://server:2812
```

7
monit/docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
monit:
image: vimagick/monit
volumes:
- monit:/etc/monit
pid: host
net: host
restart: always

View File

@ -0,0 +1,3 @@
set httpd port 2812 and
use address 0.0.0.0/0
allow admin:monit

10
monit/monit/monitrc Normal file
View File

@ -0,0 +1,10 @@
###############################################################################
## Monit control file
###############################################################################
set daemon 30
set logfile /dev/stdout
set pidfile /var/run/monit.pid
set idfile /var/lib/monit/monit.id
set statefile /var/lib/monit/monit.state
include /etc/monit/conf.d/*