diff --git a/Dockerfile b/Dockerfile index e673fd3..4cc5682 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,12 +18,14 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -RUN \ - if [ -f yarn.lock ]; then yarn run build; \ - elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ - else echo "Lockfile not found." && exit 1; \ - fi +RUN --mount=type=secret,id=SPOTIFY_CLIENT_ID \ + --mount=type=secret,id=SPOTIFY_CLIENT_SECRET \ + --mount=type=secret,id=GH_TOKEN \ + export SPOTIFY_CLIENT_ID=$(cat /run/secrets/SPOTIFY_CLIENT_ID) &&\ + export SPOTIFY_CLIENT_SECRET=$(cat /run/secrets/SPOTIFY_CLIENT_ID) &&\ + export GH_TOKEN=$(cat /run/secrets/SPOTIFY_CLIENT_ID) + +RUN corepack enable pnpm && pnpm run build FROM base AS runner WORKDIR /app diff --git a/package.json b/package.json index de25c76..6fcf9a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "links", - "version": "0.4.3", + "version": "0.4.4", "private": true, "scripts": { "dev": "next dev",