Fixing crontab and Papertrail daemon download command.

pull/1/head v1.1
Ayush Sharma 2018-09-24 14:50:34 +05:30
parent 4831c6fd2a
commit f98af75c6d
1 changed files with 9 additions and 9 deletions

View File

@ -13,6 +13,7 @@ RUN cd /root;\
cd tweet-toot;\
pip3 install -r requirements.txt;\
apt-get -y purge python3-pip git;\
apt-get -y install python3-idna;\
apt-get -y autoremove;\
apt-get -y autoclean;\
# Configure Tweet-Toot
@ -20,7 +21,7 @@ RUN cd /root;\
# Install Papertrail agent
RUN wget -qO - --header="X-Papertrail-Token: "$papertrail_token https://papertrailapp.com/destinations/10693082/setup.sh | bash;\
wget -qO - https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote-syslog2_0.20_amd64.deb;\
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 \
@ -29,7 +30,6 @@ RUN wget -qO - --header="X-Papertrail-Token: "$papertrail_token https://papertra
/tmp/tweet-toot.log;\
apt-get -y purge wget
RUN my_pwd=`pwd`;\
crontab -l > /tmp/crontab;\
echo '* * * * * python3 '$my_pwd'/run.py >> /tmp/tweet-toot.log' >> /tmp/crontab;\
RUN crontab -l > /tmp/crontab;\
echo '* * * * * cd /root/tweet-toot; python3 /root/tweet-toot/run.py >> /tmp/tweet-toot.log' >> /tmp/crontab;\
crontab /tmp/crontab