mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Update Dockerfile
This commit is contained in:
parent
9f4b9350a3
commit
bd4c8861e7
1 changed files with 8 additions and 4 deletions
12
Dockerfile
12
Dockerfile
|
@ -26,13 +26,17 @@ RUN apt-get update && apt-get install -y \
|
|||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY composer.json composer.lock ./
|
||||
RUN composer install --prefer-dist --no-dev --optimize-autoloader --no-scripts
|
||||
|
||||
COPY . /app
|
||||
|
||||
RUN composer install --prefer-dist --optimize-autoloader
|
||||
RUN php _cleanup.php && rm _cleanup.php \
|
||||
&& chown -R www-data:www-data /app \
|
||||
&& chmod -R 755 /app
|
||||
|
||||
RUN php _cleanup.php && rm _cleanup.php
|
||||
|
||||
RUN echo "*/10 * * * * php /app/cron.php >> /proc/1/fd/1 2>&1" > /etc/cron.d/app-cron \
|
||||
RUN echo "*/10 * * * * www-data php /app/cron.php >> /proc/1/fd/1 2>&1" > /etc/cron.d/app-cron \
|
||||
&& chmod 0644 /etc/cron.d/app-cron \
|
||||
&& crontab /etc/cron.d/app-cron
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue