An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: optimize caching in Dockerfile and GitHub Actions workflow
Andras Bacsai385af3143b1d
diff --git a/.github/workflows/coolify-staging-build.yml b/.github/workflows/coolify-staging-build.ymlindex b0db79e703..df737c9c38 100644--- a/.github/workflows/coolify-staging-build.yml+++ b/.github/workflows/coolify-staging-build.yml@@ -74,8 +74,10 @@ jobs:tags: |${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.sanitize.outputs.tag }}-${{ matrix.arch }}${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.sanitize.outputs.tag }}-${{ matrix.arch }}- cache-from: type=gha- cache-to: type=gha,mode=max+ cache-from: |+ type=gha,scope=build-${{ matrix.arch }}+ type=registry,ref=${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.arch }}+ cache-to: type=gha,mode=max,scope=build-${{ matrix.arch }}merge-manifest:runs-on: ubuntu-24.04diff --git a/docker/production/Dockerfile b/docker/production/Dockerfileindex 628fb50546..2ce8c834e9 100644--- a/docker/production/Dockerfile+++ b/docker/production/Dockerfile@@ -27,7 +27,8 @@ RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \WORKDIR /var/www/htmlCOPY --chown=www-data:www-data composer.json composer.lock ./-RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist+RUN --mount=type=cache,target=/tmp/cache \+ COMPOSER_CACHE_DIR=/tmp/cache composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-distUSER www-data@@ -38,7 +39,8 @@ FROM node:24-alpine AS static-assetsWORKDIR /appCOPY package*.json vite.config.js postcss.config.cjs ./-RUN npm ci+RUN --mount=type=cache,target=/root/.npm \+ npm ciCOPY . .RUN npm run build@@ -72,8 +74,9 @@ RUN apk add --no-cache gnupg && \curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /usr/share/keyrings/postgresql.gpg# Install system dependencies-RUN apk upgrade-RUN apk add --no-cache \+RUN --mount=type=cache,target=/var/cache/apk \+ apk upgrade && \+ apk add --no-cache \postgresql${POSTGRES_VERSION}-client \openssh-client \git \