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