diff --git a/.gitignore b/.gitignore index ab7eeac..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +0,0 @@ -docker-compose.yml -!docker-compose.yml.sample \ No newline at end of file diff --git a/README.md b/README.md index 883c46a..89b39e6 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ The architectures supported by this image are: Webui is accessible at http://SERVERIP:PORT -Edit /config/monitrc to add services to monitor. Use `then exec "/config/monit2apprise"` to send alerts via configured apprise targets. +Edit `/config/monitrc` to add services to monitor. Use `then exec "/config/monit2apprise.sh"` to send alerts via configured apprise targets. -Edit /config/monit2apprise to customise the alert message. +Edit `/config/monit2apprise.sh` to customise the alert message. More info at [monit](https://mmonit.com/monit/). diff --git a/docker-compose.yml.sample b/docker-compose.yml.sample deleted file mode 100644 index b546803..0000000 --- a/docker-compose.yml.sample +++ /dev/null @@ -1,23 +0,0 @@ -version: "2" - -services: - monit: - build: . - image: local/monit - container_name: monit - hostname: monit - logging: - driver: json-file - options: - max-size: "10m" - max-file: "5" - environment: - - PUID=1000 - - PGID=1000 - - TGTOKEN=${TGTOKEN} - - TGCHATID=${TGCHATID} - ports: - - 2812:2812 - volumes: - - ./config:/config - restart: unless-stopped diff --git a/root/defaults/monit2apprise b/root/defaults/monit2apprise old mode 100644 new mode 100755 diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 9f77dcb..77b3710 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -5,14 +5,16 @@ if [ ! -f "/config/monitrc" ]; then cp -a /defaults/monitrc /config/monitrc fi -if [ ! -f "/config/monit2apprise" ]; then - cp -a /defaults/monit2apprise /config/monit2apprise +if [ ! -f "/config/monit2apprise.sh" ]; then + cp -a /defaults/monit2apprise.sh /config/monit2apprise.sh fi # set permissions -chown -R abc:abc \ - /config - chmod 700 \ /config/monitrc - /config/monit2apprise + +chmod +x \ + /config/monit2apprise.sh + +chown -R abc:abc \ + /config \ No newline at end of file