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:
@@ -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
1
docker/cron/laravel
Normal file
@@ -0,0 +1 @@
|
||||
* * * * * appuser cd /var/www && /usr/local/bin/php artisan schedule:run >> /var/www/storage/logs/cron.log 2>&1
|
||||
Reference in New Issue
Block a user