mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
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:
@@ -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"]
|
||||
|
||||
20
README.md
20
README.md
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user