Installation de Supercronic pour la gestion des tâches planifiées.
This commit is contained in:
+18
-1
@@ -78,4 +78,21 @@ RUN mkdir -p /var/www/.cache/composer /var/www/.cache/npm \
|
|||||||
ENV COMPOSER_CACHE_DIR=/var/www/.cache/composer
|
ENV COMPOSER_CACHE_DIR=/var/www/.cache/composer
|
||||||
|
|
||||||
# Configuration pour NPM
|
# Configuration pour NPM
|
||||||
ENV NPM_CONFIG_CACHE=/var/www/.cache/npm
|
ENV NPM_CONFIG_CACHE=/var/www/.cache/npm
|
||||||
|
|
||||||
|
# Configuration de Supercronic pour la gestion des tâches planifiées
|
||||||
|
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.44/supercronic-linux-amd64 \
|
||||||
|
SUPERCRONIC_SHA1SUM=6eb0a8e1e6673675dc67668c1a9b6409f79c37bc \
|
||||||
|
SUPERCRONIC=supercronic-linux-amd64
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
COPY scripts/server-php-entrypoint.sh /usr/local/bin/server-php-entrypoint
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/server-php-entrypoint
|
||||||
|
|
||||||
|
ENTRYPOINT ["server-php-entrypoint"]
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
supercronic /etc/crontab &
|
||||||
|
|
||||||
|
if command -v apache2-foreground >/dev/null 2>&1; then
|
||||||
|
exec docker-php-entrypoint apache2-foreground
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v frankenphp >/dev/null 2>&1; then
|
||||||
|
exec frankenphp run --config /etc/caddy/Caddyfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Impossible de déterminer le serveur PHP à démarrer." >&2
|
||||||
|
exit 1
|
||||||
Reference in New Issue
Block a user