From f0577d015f163220bd823c27e5d84613465de58e Mon Sep 17 00:00:00 2001 From: giomba Date: Sun, 6 Dec 2020 17:45:29 +0100 Subject: [PATCH] cron fix for tgbot docker image --- tgbot/Dockerfile | 5 ++--- tgbot/entrypoint.sh | 1 + tgbot/tgbot.cron | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 100755 tgbot/tgbot.cron diff --git a/tgbot/Dockerfile b/tgbot/Dockerfile index ef5ad70..18143b7 100644 --- a/tgbot/Dockerfile +++ b/tgbot/Dockerfile @@ -3,13 +3,12 @@ FROM php:7.4-apache RUN apt-get update RUN apt-get install -y git RUN apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-3.1.5 && docker-php-ext-enable memcached -RUN git clone --depth 1 --branch docker https://git.golem.linux.it/golem/golem-telegram-bot.git /var/www/html RUN docker-php-ext-install calendar && docker-php-ext-configure calendar RUN docker-php-ext-install mysqli RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini - RUN apt-get install -y cron -COPY tgbot.cron /etc/cron.hourly/ + +RUN git clone --depth 1 --branch docker https://git.golem.linux.it/golem/golem-telegram-bot.git /var/www/html COPY entrypoint.sh / diff --git a/tgbot/entrypoint.sh b/tgbot/entrypoint.sh index c6733b6..0b6a16c 100755 --- a/tgbot/entrypoint.sh +++ b/tgbot/entrypoint.sh @@ -1,3 +1,4 @@ #!/bin/bash service cron start +crontab -u www-data /var/www/html/tgbot.cron apachectl -D FOREGROUND diff --git a/tgbot/tgbot.cron b/tgbot/tgbot.cron deleted file mode 100755 index 9395948..0000000 --- a/tgbot/tgbot.cron +++ /dev/null @@ -1,2 +0,0 @@ -php /var/www/html/schedule.php -