Skip to content

Commit

Permalink
Add docker-compose example
Browse files Browse the repository at this point in the history
  • Loading branch information
seblucas committed Oct 1, 2018
1 parent c53ddac commit 34e0d3c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ optional arguments:
-v, --verbose Enable debug messages. (default: False)
```
## Docker
I added a sample Dockerfile, I personaly use it with a `docker-compose.yml` like this one :
```yml
version: '3'
services:
cron-i2c:
build: https://github.com/seblucas/i2c2mqtt.git
image: i2c-python3-cron:latest
restart: always
environment:
CRON_STRINGS: "1,16,31,46 * * * * i2c2mqtt.py -d bh1750 -d bme280 -m mosquitto -t sensor/i2c"
CRON_LOG_LEVEL: 8
devices:
- "/dev/i2c-1:/dev/i2c-1"
```
# Credits
* bme280.py comes from [this repository](https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/bme280.py)
Expand Down

0 comments on commit 34e0d3c

Please sign in to comment.