diff --git a/Dockerfile b/Dockerfile index 9b0f471..80dc8a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM python:2-onbuild MAINTAINER Mitsuo Takaki -VOLUME /usr/src/app/ +COPY config.yml /usr/src/app/config/ +VOLUME /usr/src/app/config/ -ENTRYPOINT ["python", "cachet_url_monitor/scheduler.py", "config.yml"] +ENTRYPOINT ["python", "cachet_url_monitor/scheduler.py", "config/config.yml"] diff --git a/README.md b/README.md index f336d91..d65840b 100644 --- a/README.md +++ b/README.md @@ -59,4 +59,22 @@ To start the agent: ``` $ python cachet_url_monitor/scheduler.py config.yml -``` \ No newline at end of file +``` + +## Docker + +You can run the agent in docker, so you won't need to worry about installing python, virtualenv, or any other dependency into your OS. The `Dockerfile` and `docker-compose.yml` files are already checked in and it's ready to be used. + +To start the agent in a container using docker compose: + +``` +$ docker-compose build +$ docker-compose up +``` + +Or pulling directly from [dockerhub](https://hub.docker.com/r/mtakaki/cachet-url-monitor/). You will need to create your own custom `config.yml` file and put it in a folder (`my_config`): + +``` +$ docker pull mtakaki/cachet-url-monitor:0.1 +$ docker run --rm -it -v my_config/:/usr/src/app/config/ mtakaki/cachet-url-monitor:0.1 +```