From 679a41ca5ae1b0981173f75311a593cc970a3ecb Mon Sep 17 00:00:00 2001 From: Daniel Haarhoff Date: Wed, 14 Feb 2024 11:27:43 +0000 Subject: [PATCH] Start creating a deployable container --- Dockerfile | 20 ++++++++++++++++++++ crontab | 1 + 2 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100644 crontab diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7110cf3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:20-alpine + +RUN apk add curl make + +# Latest releases available at https://github.com/aptible/supercronic/releases +ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64 \ + SUPERCRONIC=supercronic-linux-amd64 \ + SUPERCRONIC_SHA1SUM=cd48d45c4b10f3f0bfdd3a57d054cd05ac96812b + +RUN curl -fsSLO "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ + && chmod +x "$SUPERCRONIC" \ + && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ + && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic + +COPY . /app + +WORKDIR /app + +CMD [ "supercronic", "/app/crontab" ] \ No newline at end of file diff --git a/crontab b/crontab new file mode 100644 index 0000000..8f6ba68 --- /dev/null +++ b/crontab @@ -0,0 +1 @@ +* * * * * make start \ No newline at end of file