feat: add cron scheduling and update services

- Added go-crond library to Dockerfile for task scheduling
- Created schedule service in compose.yaml with go-crond
- Added cron configuration file: docker/cron/laravel
- Updated README.md
- Improved service configurations with health checks
- Switched to base frankenphp image
This commit is contained in:
2026-02-08 00:15:35 +07:00
parent d6022b9bca
commit 6d721dba79
4 changed files with 39 additions and 11 deletions

View File

@@ -14,6 +14,13 @@ RUN apk add --no-cache \
curl \
bash
RUN GOCROND_VERSION=22.9.1 \
GOCRON_OS=linux \
GOCRON_ARCH=amd64 \
&& wget -O /usr/local/bin/go-crond \
https://github.com/webdevops/go-crond/releases/download/${GOCROND_VERSION}/go-crond.${GOCRON_OS}.${GOCRON_ARCH} \
&& chmod +x /usr/local/bin/go-crond
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN addgroup -g ${GROUP_ID} ${USER_NAME} && \

1
docker/cron/laravel Normal file
View File

@@ -0,0 +1 @@
* * * * * appuser cd /var/www && /usr/local/bin/php artisan schedule:run >> /var/www/storage/logs/cron.log 2>&1