このコミットが含まれているのは:
守矢諏訪子 2022-02-01 11:57:02 +09:00
コミット 9b83b4ebdb
2個のファイルの変更28行の追加1行の削除

ファイルの表示

@ -13,7 +13,7 @@ RUN apt-get install -y nodejs
# yarnをインストール
RUN apt-get update
RUN apt-get -y install git unzip libzip-dev libicu-dev libonig-dev zlib1g-dev
RUN apt-get -y install git unzip libzip-dev libicu-dev libonig-dev zlib1g-dev cron
RUN apt-get clean
RUN curl --output libpng16-16_1.6.36-6_amd64.deb http://ftp.jp.debian.org/debian/pool/main/libp/libpng1.6/libpng16-16_1.6.36-6_amd64.deb
RUN curl --output libpng-dev_1.6.36-6_amd64.deb http://ftp.jp.debian.org/debian/pool/main/libp/libpng1.6/libpng-dev_1.6.36-6_amd64.deb
@ -31,5 +31,9 @@ RUN docker-php-ext-configure gd --with-jpeg
RUN docker-php-ext-install -j$(nproc) intl pdo_mysql zip bcmath gd exif
COPY ./php.ini /usr/local/etc/php/php.ini
COPY ./crontab /etc/crontab
CMD ["cron","-f", "-l", "2"]
#RUN cd /work && composer update && npm run prod && php artisan migrate:fresh --seed
WORKDIR /work

23
infra/php/crontab ノーマルファイル
ファイルの表示

@ -0,0 +1,23 @@
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
* * * * * root cd /work && php artisan schedule:run >> /dev/null 2>&1
#