Remove Gorush, use direct APNs/FCM, fix worker queries

- Remove Gorush push server dependency (now using direct APNs/FCM)
- Update docker-compose.yml to remove gorush service
- Update config.go to remove GORUSH_URL
- Fix worker queries:
  - Use auth_user instead of user_user table
  - Use completed_at instead of completion_date column
- Add NotificationService to worker handler for actionable notifications
- Add docs/PUSH_NOTIFICATIONS.md with architecture documentation
- Update README.md, DOKKU_SETUP.md, and dev.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-06 00:59:42 -06:00
parent 91a1f7ebed
commit 5a6bad3ec3
8 changed files with 423 additions and 263 deletions

View File

@@ -38,37 +38,6 @@ services:
networks:
- casera-network
# Gorush Push Notification Server
# Note: Disabled by default. Start with: docker-compose --profile push up
gorush:
image: appleboy/gorush:latest
container_name: casera-gorush
restart: unless-stopped
profiles:
- push # Only start when push profile is enabled
ports:
- "${GORUSH_PORT:-8088}:8088"
volumes:
- ./push_certs:/certs:ro
environment:
GORUSH_CORE_PORT: "8088"
GORUSH_CORE_SYNC: "true"
GORUSH_IOS_ENABLED: "${GORUSH_IOS_ENABLED:-true}"
GORUSH_IOS_KEY_PATH: "/certs/apns_key.p8"
GORUSH_IOS_KEY_ID: "${APNS_AUTH_KEY_ID}"
GORUSH_IOS_TEAM_ID: "${APNS_TEAM_ID}"
GORUSH_IOS_TOPIC: "${APNS_TOPIC:-com.example.casera}"
GORUSH_IOS_PRODUCTION: "${APNS_PRODUCTION:-false}"
GORUSH_ANDROID_ENABLED: "${GORUSH_ANDROID_ENABLED:-true}"
GORUSH_ANDROID_APIKEY: "${FCM_SERVER_KEY}"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8088/api/stat/go"]
interval: 30s
timeout: 10s
retries: 3
networks:
- casera-network
# Casera API
api:
build:
@@ -107,8 +76,7 @@ services:
DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-Casera <noreply@casera.com>}
EMAIL_USE_TLS: "${EMAIL_USE_TLS:-true}"
# Push Notifications
GORUSH_URL: "http://gorush:8088"
# Push Notifications (Direct APNs/FCM - no Gorush)
APNS_AUTH_KEY_PATH: "/certs/apns_key.p8"
APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID}
APNS_TEAM_ID: ${APNS_TEAM_ID}
@@ -123,8 +91,6 @@ services:
condition: service_healthy
redis:
condition: service_healthy
# gorush: # Optional - enable when push notifications are configured
# condition: service_started
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/api/health/"]
interval: 30s
@@ -179,8 +145,13 @@ services:
# Security
SECRET_KEY: ${SECRET_KEY:-dev-secret-key-change-in-production-min-32-chars}
# Push Notifications
GORUSH_URL: "http://gorush:8088"
# Push Notifications (Direct APNs/FCM - no Gorush)
APNS_AUTH_KEY_PATH: "/certs/apns_key.p8"
APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID}
APNS_TEAM_ID: ${APNS_TEAM_ID}
APNS_TOPIC: ${APNS_TOPIC:-com.example.casera}
APNS_USE_SANDBOX: "${APNS_USE_SANDBOX:-true}"
FCM_SERVER_KEY: ${FCM_SERVER_KEY}
# Email
EMAIL_HOST: ${EMAIL_HOST:-smtp.gmail.com}