feat(crontab): install cron in php-fpm container

This commit is contained in:
2024-04-10 00:34:00 +03:00
parent 944484713c
commit eb4072916c
2 changed files with 15 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ worker-restart:
clear-images:
docker-compose exec php-fpm ./artisan clear:orphaned-images
links-images:
jdupes -r -1 -l app/storage/app
tinker:
docker-compose exec php-fpm ./artisan tinker

View File

@@ -1,6 +1,10 @@
FROM phpdockerio/php:8.2-fpm
WORKDIR "/application"
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=cd48d45c4b10f3f0bfdd3a57d054cd05ac96812b
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get update && \
apt-get -y --no-install-recommends install \
@@ -14,9 +18,17 @@ RUN apt-get update && \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
RUN apt-get update && \
apt-get install -y ffmpeg && \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
ENV PATH=node_modules/.bin:$PATH
CMD ["supercronic", "/application/crontab"]