docker and workflow fixed for runtime VAPID
This commit is contained in:
parent
c94a919304
commit
e83f576984
2
.github/workflows/deploy-ec2.yml
vendored
2
.github/workflows/deploy-ec2.yml
vendored
@ -37,6 +37,8 @@ jobs:
|
||||
tags: ${{ env.IMAGE_NAME }}:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
NEXT_PUBLIC_VAPID_PUBLIC_KEY=${{ secrets.NEXT_PUBLIC_VAPID_PUBLIC_KEY }}
|
||||
|
||||
- name: Save application image
|
||||
run: |
|
||||
|
||||
@ -12,6 +12,10 @@ RUN npm ci && npx prisma generate
|
||||
# Copy application code
|
||||
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
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user