From 5f9ee09ebd3769f3a58184d386488eae21b468db Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:13:01 +0200 Subject: [PATCH 1/3] Add yarn timeout & cleanup --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c99bcc25..3dfc99c97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,9 @@ WORKDIR /build 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 --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine @@ -36,8 +38,8 @@ RUN touch .env RUN composer install --no-dev --optimize-autoloader # Set file permissions -RUN chmod -R 755 /var/www/html/storage \ - && chmod -R 755 /var/www/html/bootstrap/cache +RUN chmod -R 755 storage \ + && chmod -R 755 bootstrap/cache # Add scheduler to cron 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 \ CMD curl -f http://localhost/up || exit 1 -EXPOSE 80:2019 -EXPOSE 443 +EXPOSE 80 443 VOLUME /pelican-data From 04b251d1258498b62cb69d72fafea893f0d831a9 Mon Sep 17 00:00:00 2001 From: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:51:22 +0000 Subject: [PATCH 2/3] Disable Caddy admin endpoint --- Caddyfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Caddyfile b/Caddyfile index 1c835bf05..e30760959 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,4 +1,5 @@ { + admin off email {$ADMIN_EMAIL} } From b14f6e1645a480b5c9f0bf1bc1690a615279398e Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Mon, 14 Oct 2024 23:05:47 +0200 Subject: [PATCH 3/3] Update Dockerfile --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dfc99c97..c759649f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,7 @@ RUN touch .env RUN composer install --no-dev --optimize-autoloader # Set file permissions -RUN chmod -R 755 storage \ - && chmod -R 755 bootstrap/cache +RUN chmod -R 755 storage bootstrap/cache # Add scheduler to cron RUN echo "* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -