Missing reminder script in container
This commit is contained in:
parent
d80ca4a6ee
commit
ab2c355452
2 changed files with 13 additions and 7 deletions
|
|
@ -6,8 +6,9 @@ RUN cd /toot && cargo build
|
||||||
|
|
||||||
FROM ruby:3-bullseye
|
FROM ruby:3-bullseye
|
||||||
COPY --from=toot /toot/target/debug/toot /usr/local/bin/
|
COPY --from=toot /toot/target/debug/toot /usr/local/bin/
|
||||||
RUN gem install t
|
RUN gem install t && gem install ri_cal
|
||||||
COPY scripts/send-reminder-tweets.sh /usr/local/bin/
|
COPY scripts/send-reminder-tweets.sh /usr/local/bin/
|
||||||
|
COPY scripts/tweet-reminders.rb /usr/local/bin/
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
ENV WEBSITE_DIR=/website
|
ENV WEBSITE_DIR=/website
|
||||||
RUN useradd -M -d /data reminders && chown reminders:reminders /data
|
RUN useradd -M -d /data reminders && chown reminders:reminders /data
|
||||||
|
|
|
||||||
|
|
@ -6,27 +6,32 @@ if [[ -f "/usr/local/bundle/bin/t" ]] ; then
|
||||||
else
|
else
|
||||||
T="bundle exec t"
|
T="bundle exec t"
|
||||||
fi
|
fi
|
||||||
|
if [[ -f "/usr/local/bin/tweet-reminders.rb" ]] ; then
|
||||||
|
REMINDERS=/usr/local/bin/tweet-reminders.rb
|
||||||
|
else
|
||||||
|
REMINDERS=scripts/tweet-reminders.rb
|
||||||
|
fi
|
||||||
TOOT=${TOOT:-/usr/local/bin/toot}
|
TOOT=${TOOT:-/usr/local/bin/toot}
|
||||||
|
|
||||||
cd `dirname $0`/..
|
cd `dirname $0`/..
|
||||||
|
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 0 "Heute:" | while read LINE ; do
|
||||||
$T update "$LINE"
|
$T update "$LINE"
|
||||||
done
|
done
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 1 "Morgen:" | while read LINE ; do
|
||||||
$T update "$LINE"
|
$T update "$LINE"
|
||||||
done
|
done
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 7 "In einer Woche:" | while read LINE ; do
|
||||||
$T update "$LINE"
|
$T update "$LINE"
|
||||||
done
|
done
|
||||||
|
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" 500 | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 0 "Heute:" 500 | while read LINE ; do
|
||||||
$TOOT "$LINE"
|
$TOOT "$LINE"
|
||||||
done
|
done
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" 500 | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 1 "Morgen:" 500 | while read LINE ; do
|
||||||
$TOOT "$LINE"
|
$TOOT "$LINE"
|
||||||
done
|
done
|
||||||
cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" 500 | while read LINE ; do
|
cat "$WEBSITE_DIR/cccs.ical" | "$REMINDERS" 7 "In einer Woche:" 500 | while read LINE ; do
|
||||||
$TOOT "$LINE"
|
$TOOT "$LINE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue