Moving the config to its own folder so it works better with docker, when mounting the local folder. Adding more documentation about running in docker.

This commit is contained in:
Mitsuo Takaki
2016-05-02 23:07:32 -07:00
parent b5d87bef68
commit bcc2e2cf19
2 changed files with 22 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
FROM python:2-onbuild
MAINTAINER Mitsuo Takaki <mitsuotakaki@gmail.com>
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"]

View File

@@ -59,4 +59,22 @@ To start the agent:
```
$ python cachet_url_monitor/scheduler.py config.yml
```
```
## 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
```