mirror of
https://github.com/Tony0410/nextstep.git
synced 2026-05-25 05:41:39 +08:00
Configure VAPID keys for push notifications
Added VAPID key configuration to enable PWA push notifications: - Generated VAPID public/private key pair - Added build arg for NEXT_PUBLIC_VAPID_PUBLIC_KEY (needed at Next.js build time) - Added runtime env vars for VAPID keys in docker-compose.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,10 @@ RUN npx prisma generate
|
|||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
# Build args for NEXT_PUBLIC_* variables (needed at build time)
|
||||||
|
ARG NEXT_PUBLIC_VAPID_PUBLIC_KEY
|
||||||
|
ENV NEXT_PUBLIC_VAPID_PUBLIC_KEY=${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 3: Runner (using slim Debian for better OpenSSL compatibility)
|
# Stage 3: Runner (using slim Debian for better OpenSSL compatibility)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=BEFs_VtoxY7SpNnd-ubz1ioliESlRI4sY6ny7Qp3rm7V1cm0gqyZX8TAHp4AaQ81yKC4LfWtJFQz_aHc25G-Tww
|
||||||
container_name: nextstep-app
|
container_name: nextstep-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
@@ -13,6 +15,10 @@ services:
|
|||||||
- NEXT_PUBLIC_APP_URL=https://debianvm.kangaroo-eel.ts.net:10000
|
- NEXT_PUBLIC_APP_URL=https://debianvm.kangaroo-eel.ts.net:10000
|
||||||
- TZ=Australia/Perth
|
- TZ=Australia/Perth
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
# Push notification VAPID keys
|
||||||
|
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=BEFs_VtoxY7SpNnd-ubz1ioliESlRI4sY6ny7Qp3rm7V1cm0gqyZX8TAHp4AaQ81yKC4LfWtJFQz_aHc25G-Tww
|
||||||
|
- VAPID_PRIVATE_KEY=KgVQVO7XhfCklrJ3o9wowzK90AxI6Exg9pXPq76Qx4A
|
||||||
|
- VAPID_EMAIL=mailto:admin@nextstep.local
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user