Add yarn timeout & cleanup

This commit is contained in:
MartinOscar 2024-10-14 22:13:01 +02:00 committed by GitHub
parent 2fb85f8236
commit 5f9ee09ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,9 @@ WORKDIR /build
COPY . ./ COPY . ./
RUN yarn install --frozen-lockfile && yarn run build:production RUN yarn config set network-timeout 300000 \
&& yarn install --frozen-lockfile \
&& yarn run build:production
FROM php:8.3-fpm-alpine FROM php:8.3-fpm-alpine
# FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine # FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine
@ -36,8 +38,8 @@ RUN touch .env
RUN composer install --no-dev --optimize-autoloader RUN composer install --no-dev --optimize-autoloader
# Set file permissions # Set file permissions
RUN chmod -R 755 /var/www/html/storage \ RUN chmod -R 755 storage \
&& chmod -R 755 /var/www/html/bootstrap/cache && chmod -R 755 bootstrap/cache
# Add scheduler to cron # Add scheduler to cron
RUN echo "* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data - RUN echo "* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
@ -49,8 +51,7 @@ RUN cp .github/docker/supervisord.conf /etc/supervisord.conf && \
HEALTHCHECK --interval=5m --timeout=10s --start-period=5s --retries=3 \ HEALTHCHECK --interval=5m --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost/up || exit 1 CMD curl -f http://localhost/up || exit 1
EXPOSE 80:2019 EXPOSE 80 443
EXPOSE 443
VOLUME /pelican-data VOLUME /pelican-data