mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
Add cron job to docker file.
This commit is contained in:
parent
0fa4d75a47
commit
53addcf99a
11
Dockerfile
11
Dockerfile
@ -23,6 +23,7 @@ RUN apt-get update -y && \
|
||||
libpq-dev \
|
||||
libbz2-dev \
|
||||
gettext-base \
|
||||
cron \
|
||||
locales && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@ -47,6 +48,13 @@ RUN cd /tmp && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
|
||||
# Create the log file to be able to run tail
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
# Setup cron job
|
||||
RUN (crontab -l ; echo "* * * * * root $FIREFLY_PATH/artisan schedule:run >> /var/log/cron.log") | crontab
|
||||
|
||||
# Install PHP exentions.
|
||||
RUN docker-php-ext-install -j$(nproc) curl gd intl json readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2 pdo_pgsql
|
||||
|
||||
@ -77,6 +85,9 @@ RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Run the command on container startup
|
||||
CMD cron
|
||||
|
||||
# Run entrypoint thing
|
||||
ENTRYPOINT [".deploy/docker/entrypoint.sh"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user