diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 519d827..6697ffd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,8 +43,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image run: | - docker build --build-arg BUILD_VERSION=${{ needs.release.outputs.new-release-version }} VERSION=${{ needs.release.outputs.new-release-version }} \ - -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \ + echo VERSION=${{ needs.release.outputs.new-release-version }} >> .env + docker build -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \ -t ghcr.io/${{ github.repository }}:latest . docker push ghcr.io/${{ github.repository }}:latest docker push ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} diff --git a/Dockerfile b/Dockerfile index 782e1f9..629fe2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ # Install dependencies only when needed FROM node:18-alpine AS deps # 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 COPY package.json ./ @@ -10,6 +11,7 @@ RUN npm install --frozen-lockfile # Rebuild the source code only when needed FROM node:18-alpine AS builder + WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . diff --git a/bun.lockb b/bun.lockb index a8bbfdd..e85a8f7 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 3c431eb..23e85e3 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -10,5 +10,3 @@ services: - "3000:3000" env_file: - .env - environment: - - BUILD_VERSION=${BUILD_VERSION} diff --git a/next.config.mjs b/next.config.mjs index ee15efb..65ab7b9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,11 +1,5 @@ /** @type {import('next').NextConfig} */ -import { readFileSync } from 'fs'; - -const { version } = JSON.parse(readFileSync('./package.json', 'utf-8')); - -console.log(`Version: ${version}`); - const nextConfig = { reactStrictMode: false, output: 'standalone', @@ -13,7 +7,7 @@ const nextConfig = { unoptimized: true, }, env: { - VERSION: process.env.BUILD_VERSION || version, + VERSION: process.env.VERSION, }, }; diff --git a/src/components/analytics/exif/AssetHeatMap.tsx b/src/components/analytics/exif/AssetHeatMap.tsx index 99178e2..c1a21f7 100644 --- a/src/components/analytics/exif/AssetHeatMap.tsx +++ b/src/components/analytics/exif/AssetHeatMap.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import { getHeatMapData } from "@/handlers/api/analytics.handler"; import { useConfig } from "@/contexts/ConfigContext"; +import { Tooltip } from "@/components/ui/tooltip"; type HeatMapEntry = { date: string; @@ -8,7 +9,7 @@ type HeatMapEntry = { }; export default function AssetHeatMap() { - const { exImmichUrl } = useConfig(); + const { exImmichUrl } = useConfig(); const [heatMapData, setHeatMapData] = useState([]); const [loading, setLoading] = useState(false); @@ -117,18 +118,19 @@ export default function AssetHeatMap() { > { column[rowIndex]?.date ? ( - -
- ) :
+ +
+ ) :
+ } ))} diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx index 53407fc..226fee5 100644 --- a/src/components/ui/tooltip.tsx +++ b/src/components/ui/tooltip.tsx @@ -26,14 +26,22 @@ const TooltipContent = React.forwardRef< TooltipContent.displayName = TooltipPrimitive.Content.displayName -const Tooltip: React.FC> = ({ +export interface ITooltipProps extends React.ComponentProps { + content: string +} +const Tooltip: React.FC = ({ children, + content, ...props }) => ( - {children} - + + {children} + + +

{content}

+
)