Files
Todo/PUSH_NOTIFICATIONS_DOCKER_CHECKLIST.md
2025-12-07 01:31:33 +00:00

82 lines
1.5 KiB
Markdown

# Push Notifications Docker Setup Checklist
## ✅ What's Already Done
- [x] Code implementation complete
- [x] Docker configuration updated
- [x] Environment variables added to docker-compose.yml
- [x] Dependencies added to package.json (will install on build)
## 🔧 What You Need to Do
### [ ] 1. Generate VAPID Keys
Run this command:
```bash
npx web-push generate-vapid-keys
```
Or if you don't have Node locally:
```bash
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:
```env
VAPID_PUBLIC_KEY=BNxxx...
VAPID_PRIVATE_KEY=xxx...
VAPID_SUBJECT=mailto:psbailey31@gmail.com
```
### [ ] 3. Update Database
Start containers and run migration:
```bash
docker-compose up -d
docker-compose exec app npx prisma db push
```
### [ ] 4. Rebuild Containers
```bash
docker-compose down
docker-compose up --build
```
## ✅ Verify It Works
1. Open http://localhost:3500
2. Log in
3. Wait 3 seconds
4. See notification prompt appear
5. Click "Enable Notifications"
6. 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:**
```bash
docker-compose exec app env | grep VAPID
```
**Check database tables:**
```bash
docker-compose exec app npx prisma studio
```
**View logs:**
```bash
docker-compose logs -f app
```
**Restart after .env changes:**
```bash
docker-compose restart
```