From 69423e2d28d55c9eb21e60c6b4ec83c88edfd392 Mon Sep 17 00:00:00 2001 From: Tim Schuster Date: Mon, 11 Mar 2019 12:15:13 +0100 Subject: [PATCH] Added Dockerfile and poll.sh --- Dockerfile | 17 +++++++++++++++++ poll.sh | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100755 poll.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..69159a2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:10-slim + +RUN apt-get update && apt-get install --assume-yes software-properties-common && \ + apt-get install --assume-yes git cron + +RUN git clone https://github.com/yogthos/mastodon-bot /mastodon-bot && \ + cd /mastodon-bot && npm install && \ + npm install -g lumo-cljs + +RUN mkdir /config && touch /config/config.edn && touch /var/log/cron.log + +ADD poll.sh /poll.sh + +ENV MASTODON_BOT_CONFIG /config/config.edn +VOLUME /config + +CMD /poll.sh diff --git a/poll.sh b/poll.sh new file mode 100755 index 0000000..74b2ce3 --- /dev/null +++ b/poll.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +while true; do + echo "Polling Bot" + cd /mastodon-bot + npm start + echo "Poll done, waiting 600 seconds" + sleep 600 +done