nestwatcher icon indicating copy to clipboard operation
nestwatcher copied to clipboard

Docker-compose

Open klablabla opened this issue 3 years ago • 1 comments

It would be great if there is a docker-compose file. So we can create a container for nestwatcher.

klablabla avatar Mar 03 '21 16:03 klablabla

script for loop / waitime

` from datetime import datetime from time import sleep import os intervall = int(os.environ['INTERVALL']) try: while True: payload = datetime.now().strftime('%Y-%m-%d %H:%M:%S') print("Ausgeführt am: " + payload) os.system("python3 ./nests.py") sleep(intervall * 60 * 60) finally: print("Script Ende");

`

Dockerfile ` FROM python:3

WORKDIR /usr/src/app

COPY requirements.txt ./

RUN pip3 install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "./start.py"] `

docker-compose.yml ` nestw: build: ./nestwatcher container_name: NestWatcher restart: unless-stopped environment: INTERVALL: 6 volumes: - ./nestwatcher/nest.json:/usr/src/app/nest.json - ./nestwatcher/config:/usr/src/app/config

`

Speedyhome72 avatar May 30 '22 13:05 Speedyhome72