From f90d0eb492bc1bba94f825107b67e1037d6d513a Mon Sep 17 00:00:00 2001 From: SaEEd Date: Mon, 16 Sep 2024 14:56:22 +0330 Subject: [PATCH] update --- Dockerfile | 5 +++-- crontab.conf | 1 + entrypoint.sh | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 crontab.conf diff --git a/Dockerfile b/Dockerfile index 2f9508a..c5841b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN apt-get update; \ libc-ares-dev \ libnss3 libatk1.0-0 \ libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \ - libpango1.0.0 libcairo2 libasound2 libxfixes3 libatk-bridge2.0.0 + libpango1.0.0 libcairo2 libasound2 libxfixes3 libatk-bridge2.0.0 cron RUN docker-php-ext-configure zip RUN docker-php-ext-configure intl @@ -54,6 +54,7 @@ WORKDIR /app RUN chown -R octane:octane . EXPOSE 80 COPY ./supervisord.conf /etc/supervisor/octane.conf +COPY ./crontab.conf /etc/cron.d/laravel COPY ./entrypoint.sh /etc/entrypoint.sh ENTRYPOINT ["/etc/entrypoint.sh"] -HEALTHCHECK --start-period=30s --interval=30s --timeout=5s --retries=8 CMD php artisan octane:status || exit 1 +HEALTHCHECK --start-period=60s --interval=30s --timeout=5s --retries=3 CMD php artisan octane:status || exit 1 diff --git a/crontab.conf b/crontab.conf new file mode 100644 index 0000000..03cd10a --- /dev/null +++ b/crontab.conf @@ -0,0 +1 @@ +* * * * * octane cd /app && php artisan schedule:run >> /dev/null 2>&1 diff --git a/entrypoint.sh b/entrypoint.sh index 3b04200..9432675 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,4 +7,5 @@ su -c "php artisan event:cache" octane su -c "php artisan config:cache" octane su -c "php artisan route:cache" octane +service cron start exec supervisord --configuration /etc/supervisor/octane.conf