Compare commits

...

3 Commits

Author SHA1 Message Date
e3ee336440 added drone support
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-06 15:03:21 -05:00
989c1cd684 opt in to healthcheck 2023-06-06 00:48:21 -05:00
e833f06851 updated cron 2023-06-06 00:24:39 -05:00
4 changed files with 28 additions and 2 deletions

View File

@ -11,6 +11,11 @@ Dockerfile
*.csv *.csv
*.toml *.toml
*.git* *.git*
.DS_Store
.vscode/*
thunder-tests/*
.drone.yml
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]

19
.drone.yml Normal file
View File

@ -0,0 +1,19 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: git.jbranan.com
dry_run: true
username: jblu
password:
from_secret: gittea_drone
repo: jblu/crane
tags:
- latest
- main
when:
branch:
- main

View File

@ -55,6 +55,7 @@ class Crn:
self.observed_containers = list(self.config["containers"].values()) self.observed_containers = list(self.config["containers"].values())
self.container_statuses = ["paused","dead","created","exited","removing","restarting","created"] self.container_statuses = ["paused","dead","created","exited","removing","restarting","created"]
#healthcheck #healthcheck
self.use_healthcheck = self.config["healthcheck"]["use_healthcheck"]
self.healthcheck_url = self.config["healthcheck"]["healthcheck_url"] self.healthcheck_url = self.config["healthcheck"]["healthcheck_url"]
cont_log(self) cont_log(self)
@ -82,7 +83,8 @@ class Crn:
cont_notify_summary(self, apprise_notify, requests) cont_notify_summary(self, apprise_notify, requests)
if self.use_apprise: if self.use_apprise:
cont_notify_summary(self, apprise_notify, requests) cont_notify_summary(self, apprise_notify, requests)
send_ping(self, requests, self.healthcheck_url) if self.use_healthcheck:
send_ping(self, requests, self.healthcheck_url)
# Run # Run
if __name__== "__main__": if __name__== "__main__":

View File

@ -1 +1 @@
0 1 * * * . /etc/environment; python /opt/crane.py >> /logfile */5 * * * * . /etc/environment; python /opt/crane.py >> /logfile