mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 18:01:37 +00:00
add cron to docker
This commit is contained in:
parent
d07e9bcad2
commit
868b70f530
@ -19,7 +19,7 @@ RUN apt-get install -y nginx
|
|||||||
|
|
||||||
# php
|
# php
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor libcap2-bin libpng-dev \
|
&& apt-get install -y cron gnupg gosu curl ca-certificates zip unzip git supervisor libcap2-bin libpng-dev \
|
||||||
python2 dnsutils librsvg2-bin fswatch wget \
|
python2 dnsutils librsvg2-bin fswatch wget \
|
||||||
&& add-apt-repository ppa:ondrej/php -y \
|
&& add-apt-repository ppa:ondrej/php -y \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@ -44,6 +44,8 @@ RUN rm /etc/nginx/sites-enabled/default
|
|||||||
COPY docker/nginx.conf /etc/nginx/sites-available/default
|
COPY docker/nginx.conf /etc/nginx/sites-available/default
|
||||||
RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
|
RUN echo "* * * * * cd /var/www/html && php artisan schedule:run >> /var/log/cron.log 2>&1" | crontab -
|
||||||
|
|
||||||
# supervisord
|
# supervisord
|
||||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ php /var/www/html/artisan view:cache
|
|||||||
|
|
||||||
php /var/www/html/artisan user:create "$NAME" "$EMAIL" "$PASSWORD"
|
php /var/www/html/artisan user:create "$NAME" "$EMAIL" "$PASSWORD"
|
||||||
|
|
||||||
|
cron
|
||||||
|
|
||||||
echo "Vito is running! 🚀"
|
echo "Vito is running! 🚀"
|
||||||
|
|
||||||
/usr/bin/supervisord
|
/usr/bin/supervisord
|
||||||
|
Loading…
x
Reference in New Issue
Block a user