diff --git a/Dockerfile b/Dockerfile index c9cfdac..1580bcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ ENV PYTHONIOENCODING=utf-8 ADD . / +RUN printenv > /env + RUN echo "*/2 * * * * /delay_price.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/get_price RUN chmod 0644 /etc/cron.d/get_price diff --git a/delay_price.sh b/delay_price.sh index 89f1baa..723a14f 100644 --- a/delay_price.sh +++ b/delay_price.sh @@ -1,5 +1,5 @@ #!/bin/bash -export PYTHONPATH=/usr/local/lib/python3.12/site-packages +source /env sleep 2 -/usr/local/bin/python3 /get_price.py >> /var/log/cron.log 2>&1 \ No newline at end of file +python3 /get_price.py >> /var/log/cron.log 2>&1 \ No newline at end of file