Added Dockerfile and poll.sh

This commit is contained in:
Tim Schuster 2019-03-11 12:15:13 +01:00
parent ce8792467d
commit 69423e2d28
No known key found for this signature in database
GPG key ID: F9E27097EFB77F61
2 changed files with 26 additions and 0 deletions

17
Dockerfile Normal file
View file

@ -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

9
poll.sh Executable file
View file

@ -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