Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-compose #44

Open
klablabla opened this issue Mar 3, 2021 · 1 comment
Open

Docker-compose #44

klablabla opened this issue Mar 3, 2021 · 1 comment

Comments

@klablabla
Copy link

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

@Speedyhome72
Copy link

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

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants