Changing logging to stdout.

pull/7/head v1.4
Ayush Sharma 2018-11-11 15:47:05 +05:30
parent d984778d8b
commit e584be4760
1 changed files with 2 additions and 15 deletions

View File

@ -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,21 +17,9 @@ 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