1.5 KiB
1.5 KiB
Push Notifications Docker Setup Checklist
✅ What's Already Done
- Code implementation complete
- Docker configuration updated
- Environment variables added to docker-compose.yml
- Dependencies added to package.json (will install on build)
🔧 What You Need to Do
[ ] 1. Generate VAPID Keys
Run this command:
npx web-push generate-vapid-keys
Or if you don't have Node locally:
docker run --rm -it node:20-slim sh -c "npm install -g web-push && web-push generate-vapid-keys"
[ ] 2. Add Keys to .env
Copy the output and add to your .env file:
VAPID_PUBLIC_KEY=BNxxx...
VAPID_PRIVATE_KEY=xxx...
VAPID_SUBJECT=mailto:psbailey31@gmail.com
[ ] 3. Update Database
Start containers and run migration:
docker-compose up -d
docker-compose exec app npx prisma db push
[ ] 4. Rebuild Containers
docker-compose down
docker-compose up --build
✅ Verify It Works
- Open http://localhost:3500
- Log in
- Wait 3 seconds
- See notification prompt appear
- Click "Enable Notifications"
- Test by adding items from another browser
🎉 Done!
Once you complete these 4 steps, push notifications will work automatically!
Quick Reference
Check if VAPID keys are loaded:
docker-compose exec app env | grep VAPID
Check database tables:
docker-compose exec app npx prisma studio
View logs:
docker-compose logs -f app
Restart after .env changes:
docker-compose restart