chore: Add cron service and crontab for Laravel cron jobs
This commit is contained in:
@@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
zip \
|
||||
fish \
|
||||
cron \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install gd mbstring zip pdo pdo_mysql pdo_pgsql
|
||||
|
||||
@@ -43,6 +44,11 @@ RUN mkdir -p /root/.ssh
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Copy the crontab file into the container
|
||||
COPY crontab /etc/cron.d/laravel-cron
|
||||
RUN chmod 0644 /etc/cron.d/laravel-cron
|
||||
RUN crontab /etc/cron.d/laravel-cron
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user