docker
docker copied to clipboard
Add missing environment variables to Dockerfile for Docker deployments
Changes
Add support for VAPID (Voluntary Application Server Identification) keys in Docker builds:
- Add
NEXT_PUBLIC_VAPID_PUBLIC_KEYas optional build argument and environment variable - Add
VAPID_PRIVATE_KEYas optional build argument and environment variable - Include VAPID variables in all Docker build stages (builder, builder-two, runner)
Problem Solved
Fixes "Please enable Google services for push messaging" error that occurs when:
- Web push notifications are enabled in the application
- VAPID keys are not available during the Docker build process
process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEYreturns undefined, causing invalid applicationServerKey