install heatmaps image

This commit is contained in:
Francis Cao
2026-05-27 09:26:24 -07:00
parent 77886a32cc
commit e068471f9c
2 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
with:
image: umamisoftware/umami
tags: cloud-${{ steps.random_hash.outputs.hash }}, cloud-latest
buildArgs: DATABASE_TYPE=postgresql
buildArgs: DATABASE_TYPE=postgresql,INSTALL_HEATMAP=true
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
+10 -9
View File
@@ -1,19 +1,23 @@
ARG NODE_IMAGE_VERSION="22-alpine"
ARG PNPM_VERSION="10.15.1"
ARG INSTALL_HEATMAP="false"
# Install dependencies only when needed
FROM node:${NODE_IMAGE_VERSION} AS deps
ARG INSTALL_HEATMAP
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm
RUN cat > pnpm-workspace.yaml << EOF
strictDepBuilds: false
EOF
RUN printf 'strictDepBuilds: false\n' > pnpm-workspace.yaml
RUN pnpm install --frozen-lockfile
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH \
&& if [ "$INSTALL_HEATMAP" = "true" ]; then pnpm run install-heatmap; fi
# Rebuild the source code only when needed
FROM node:${NODE_IMAGE_VERSION} AS builder
@@ -39,6 +43,7 @@ ARG NODE_OPTIONS
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_OPTIONS=$NODE_OPTIONS
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
@@ -48,12 +53,7 @@ RUN set -x \
RUN echo {} > package.json
RUN cat > pnpm-workspace.yaml << EOF
allowBuilds:
'@prisma/engines': true
prisma: false
verifyDepsBeforeRun: false
EOF
RUN printf "allowBuilds:\n '@prisma/engines': true\n prisma: false\nverifyDepsBeforeRun: false\n" > pnpm-workspace.yaml
# Script dependencies
RUN pnpm add npm-run-all dotenv chalk semver \
@@ -66,6 +66,7 @@ COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/generated ./generated
COPY --from=deps --chown=nextjs:nodejs /ms-playwright /ms-playwright
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing