Changing logging to stdout.

pull/7/head v1.4
Ayush Sharma 4 years ago
parent d984778d8b
commit e584be4760
  1. 17
      Dockerfile

@ -3,7 +3,6 @@ FROM ubuntu
MAINTAINER ayushsharma.22+tweettoot@gmail.com
ARG mastodon_token
ARG papertrail_token
RUN cd /root;\
apt-get -y update;\
@ -18,23 +17,11 @@ RUN cd /root;\
apt-get -y autoclean;\
# Configure Tweet-Toot
sed -i 's/"toots.app_secure_token": ""/"toots.app_secure_token": "'$mastodon_token'"/g' config.json;\
sed -i '/imklog/d' /etc/rsyslog.conf
# Install Papertrail agent
RUN wget -qO - --header="X-Papertrail-Token: "$papertrail_token https://papertrailapp.com/destinations/10693082/setup.sh | bash;\
wget - https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote-syslog2_0.20_amd64.deb;\
dpkg -i remote-syslog2_0.20_amd64.deb;\
remote_syslog \
-p 22420 \
-d logs7.papertrailapp.com \
--pid-file=/var/run/remote_syslog.pid \
/tmp/tweet-toot.log;\
apt-get -y purge wget
RUN crontab -l > /tmp/crontab;\
echo '* * * * * cd /root/tweet-toot; python3 /root/tweet-toot/run.py >> /tmp/tweet-toot.log' >> /tmp/crontab;\
echo '* * * * * cd /root/tweet-toot; python3 /root/tweet-toot/run.py 2>&1 /tmp/tweet-toot.log' >> /tmp/crontab;\
crontab /tmp/crontab
RUN touch /tmp/tweet-toot.log
CMD cron && tail -f /tmp/tweet-toot.log
CMD cron && tail -f /tmp/tweet-toot.log
Loading…
Cancel
Save