metalmatze / alertmanager-bot

[deprecated] Bot for Prometheus' Alertmanager
MIT License
661 stars 148 forks source link

expose #105

Closed tcurdt closed 4 years ago

tcurdt commented 4 years ago

Given that the port can be configured I suggest to remove the EXPOSE from the Dockerfile.

metalmatze commented 4 years ago

Sounds good! Do you want to send a PR? :)

tcurdt commented 4 years ago

There you go :)

https://github.com/metalmatze/alertmanager-bot/pull/106

budimanjojo commented 4 years ago

Please also update the documentation to configure the port in docker and docker-compose file like this:

docker run -d \
    -e 'ALERTMANAGER_URL=http://alertmanager:9093' \
    -e 'BOLT_PATH=/data/bot.db' \
    -e 'STORE=bolt' \
    -e 'TELEGRAM_ADMIN=1234567' \
    -e 'TELEGRAM_TOKEN=XXX' \
    -v '/srv/monitoring/alertmanager-bot:/data' \
    --name alertmanager-bot \
        --expose=8080
    metalmatze/alertmanager-bot:0.4.2
alertmanager-bot:
  image: metalmatze/alertmanager-bot:0.4.2
  expose:
  - 8080
  environment:
    ALERTMANAGER_URL: http://alertmanager:9093
    BOLT_PATH: /data/bot.db
    STORE: bolt
    TELEGRAM_ADMIN: '1234567'
    TELEGRAM_TOKEN: XXX
    TEMPLATE_PATHS: /templates/default.tmpl
  volumes:
  - /srv/monitoring/alertmanager-bot:/data
metalmatze commented 4 years ago

Feel free to send another PR to update those files. Closing this issue as the initial problem was solved.