diff --git a/executor/Dockerfile b/executor/Dockerfile index 3888c93..e3404e5 100644 --- a/executor/Dockerfile +++ b/executor/Dockerfile @@ -1,8 +1,18 @@ ARG REGISTRY=rg.fr-par.scw.cloud/geolake ARG TAG=latest FROM $REGISTRY/geolake-datastore:$TAG + +RUN apt update && apt install -y cron curl + + WORKDIR /app COPY requirements.txt /code/requirements.txt RUN pip install --no-cache-dir -r /code/requirements.txt COPY app /app + +COPY ./healtcheck.* /opt/ + +RUN chmod +x /opt/healtcheck.sh +RUN crontab -u root /opt/healtcheck.cron + CMD [ "python", "main.py" ] diff --git a/executor/healtcheck.cron b/executor/healtcheck.cron new file mode 100644 index 0000000..e36bf23 --- /dev/null +++ b/executor/healtcheck.cron @@ -0,0 +1 @@ +*/10 * * * * bash -c '/opt/healtcheck.sh' diff --git a/executor/healtcheck.sh b/executor/healtcheck.sh new file mode 100644 index 0000000..4d8e479 --- /dev/null +++ b/executor/healtcheck.sh @@ -0,0 +1 @@ +curl https://hc-ping.com/$HEALTCHECKS \ No newline at end of file