forked from eatvio/eatvio-infra
feat(crontab): install cron in php-fpm container
This commit is contained in:
3
Makefile
3
Makefile
@@ -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
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user