docker and workflow fixed for runtime VAPID

This commit is contained in:
root 2026-02-16 13:10:13 +05:00
parent c94a919304
commit e83f576984
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,8 @@ jobs:
tags: ${{ env.IMAGE_NAME }}:latest tags: ${{ env.IMAGE_NAME }}:latest
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
build-args: |
NEXT_PUBLIC_VAPID_PUBLIC_KEY=${{ secrets.NEXT_PUBLIC_VAPID_PUBLIC_KEY }}
- name: Save application image - name: Save application image
run: | run: |

View File

@ -12,6 +12,10 @@ RUN npm ci && npx prisma generate
# Copy application code # Copy application code
COPY . . COPY . .
# Build-time env vars (NEXT_PUBLIC_* are embedded into the JS bundle)
ARG NEXT_PUBLIC_VAPID_PUBLIC_KEY
ENV NEXT_PUBLIC_VAPID_PUBLIC_KEY=$NEXT_PUBLIC_VAPID_PUBLIC_KEY
# Build the Next.js application # Build the Next.js application
RUN npm run build RUN npm run build