Fix Phoenix check_origin configuration and add kubectl docs

- Replace invalid wildcard domains (*.aprs.me) with explicit origins
- Phoenix doesn't support wildcard syntax in check_origin
- Added specific domains for aprs.me, sentry.io, and openstreetmap.org
- Updated CLAUDE.md with kubectl commands for debugging k3s deployment

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-24 19:40:15 -05:00
parent fe67866018
commit c52adc8a9e
No known key found for this signature in database
2 changed files with 36 additions and 4 deletions

View file

@ -114,4 +114,34 @@ Tests use comprehensive mocking to prevent external connections:
## Deployment
The application supports Kubernetes deployment with manifests in `k8s/` directory and GitHub Actions CI/CD pipeline. Database migrations run automatically via init containers.
The application supports Kubernetes deployment with manifests in `k8s/` directory and GitHub Actions CI/CD pipeline. Database migrations run automatically via init containers.
### Kubernetes Commands
The app is deployed in a k3s cluster with the following structure:
- **App name**: `aprs`
- **Namespace**: `aprs`
Common kubectl commands for debugging:
```bash
# Check pod status
kubectl get pods -n aprs
# Get logs from the app
kubectl logs -f deployment/aprs -n aprs
# Get logs from a specific pod
kubectl logs <pod-name> -n aprs
# Describe pod for events and details
kubectl describe pod <pod-name> -n aprs
# Restart the deployment
kubectl rollout restart deployment/aprs -n aprs
# Check deployment status
kubectl rollout status deployment/aprs -n aprs
# Execute commands in the pod
kubectl exec -it deployment/aprs -n aprs -- /app/bin/aprsme remote
```

View file

@ -107,10 +107,12 @@ if config_env() == :prod do
check_origin: [
"https://#{host}",
"http://10.0.19.222:33897",
"*.aprs.me",
"https://aprs.me",
"https://www.aprs.me",
"https://js.sentry-cdn.com",
"*.sentry.io",
"*.openstreetmap.org"
"https://sentry.io",
"https://www.openstreetmap.org",
"https://tile.openstreetmap.org"
]
# Optional: Set the default "from" email address