docker icon indicating copy to clipboard operation
docker copied to clipboard

Add missing environment variables to Dockerfile for Docker deployments

Open BeamNawapat opened this issue 3 months ago • 1 comments

Changes

Add support for VAPID (Voluntary Application Server Identification) keys in Docker builds:

  • Add NEXT_PUBLIC_VAPID_PUBLIC_KEY as optional build argument and environment variable
  • Add VAPID_PRIVATE_KEY as 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_KEY returns undefined, causing invalid applicationServerKey

BeamNawapat avatar Sep 24 '25 21:09 BeamNawapat