fix: enable cron daemon in Dockerfile, speed up sync interval to every 5 minutes and add opportunistic auto-sync check

This commit is contained in:
2026-11-01 17:02:01 +01:00
parent ef19221b62
commit 0c95c7d120
4 changed files with 36 additions and 6 deletions
+6 -3
View File
@@ -41,12 +41,15 @@ COPY --from=node_builder /app/public/build /app/public/build
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
# Zorg voor de juiste opslagpermissies en database bestand
RUN mkdir -p /app/storage /app/bootstrap/cache /app/database \
&& touch /app/database/database.sqlite \
RUN mkdir -p /app/storage /app/bootstrap/cache /app/database /app/storage/logs \
&& touch /app/database/database.sqlite /app/storage/logs/cron.log \
&& chown -R www-data:www-data /app/storage /app/bootstrap/cache /app/database \
&& chmod -R 775 /app/storage /app/bootstrap/cache /app/database
# Configureer crontab voor Laravel Scheduler (draait elke minuut php artisan schedule:run)
RUN echo "* * * * * cd /app && php artisan schedule:run >> /app/storage/logs/cron.log 2>&1" > /etc/crontabs/root
EXPOSE 80
CMD ["sh", "-c", "php artisan storage:link && mkdir -p /app/database /app/storage/framework/cache /app/storage/framework/sessions /app/storage/framework/views /app/storage/logs && touch /app/database/database.sqlite && chmod -R 777 /app/database /app/storage && php artisan migrate --force && php artisan db:seed --force && frankenphp run --config /etc/caddy/Caddyfile"]
CMD ["sh", "-c", "php artisan storage:link && mkdir -p /app/database /app/storage/framework/cache /app/storage/framework/sessions /app/storage/framework/views /app/storage/logs && touch /app/database/database.sqlite /app/storage/logs/cron.log && chmod -R 777 /app/database /app/storage && php artisan migrate --force && php artisan db:seed --force && crond -b -l 2 && frankenphp run --config /etc/caddy/Caddyfile"]