WellNuo/DEPLOYMENT.md
Sergei 7cb07c09ce Major UI/UX updates: Voice, Subscription, Beneficiaries, Profile
- Voice tab: simplified interface, voice picker improvements
- Subscription: Stripe integration, purchase flow updates
- Beneficiaries: dashboard, sharing, improved management
- Profile: drawer, edit, help, privacy sections
- Theme: expanded constants, new colors
- New components: MockDashboard, ProfileDrawer, Toast
- Backend: Stripe routes additions
- Auth: activate, add-loved-one, purchase screens
2025-12-29 15:36:44 -08:00

75 lines
1.9 KiB
Markdown

# WellNuo Deployment Guide
## Production URLs
| Service | URL |
|---------|-----|
| **Backend API** | https://wellnuo.smartlaunchhub.com |
| **Admin Panel** | https://wellnuo-admin.smartlaunchhub.com |
## Server Info
- **IP**: `91.98.205.156`
- **SSH**: см. `~/Desktop/dev instructions/SSH_SERVER_GUIDE.md`
- **Backend Path**: `/var/www/wellnuo-api`
- **PM2 Process**: `wellnuo-api`
## Quick Deploy
### Backend (API)
```bash
# 1. Sync code (excludes node_modules and .env)
rsync -avz --exclude 'node_modules' --exclude '.env' \
~/Desktop/WellNuo/backend/ root@91.98.205.156:/var/www/wellnuo-api/
# 2. Restart PM2
ssh root@91.98.205.156 "pm2 restart wellnuo-api"
# 3. Check logs
ssh root@91.98.205.156 "pm2 logs wellnuo-api --lines 20 --nostream"
```
### One-liner Deploy
```bash
rsync -avz --exclude 'node_modules' --exclude '.env' ~/Desktop/WellNuo/backend/ root@91.98.205.156:/var/www/wellnuo-api/ && ssh root@91.98.205.156 "pm2 restart wellnuo-api"
```
## API Endpoints
### Auth
- `POST /api/auth/request-otp` - Send OTP
- `POST /api/auth/verify-otp` - Verify OTP
- `GET /api/auth/me` - Current user
- `PATCH /api/auth/profile` - Update profile
### Stripe
- `POST /api/stripe/create-checkout-session` - Web checkout (external)
- `POST /api/stripe/create-payment-sheet` - Mobile Payment Sheet (in-app)
- `POST /api/stripe/create-portal-session` - Billing portal
- `GET /api/stripe/products` - Product list
## Environment Variables
Production `.env` is on server at `/var/www/wellnuo-api/.env`
Key variables:
- `STRIPE_PUBLISHABLE_KEY` - Stripe public key
- `STRIPE_SECRET_KEY` - Stripe secret key
- `JWT_SECRET` - JWT signing key
- `DB_*` - PostgreSQL connection
## Monitoring
```bash
# PM2 status
ssh root@91.98.205.156 "pm2 status | grep wellnuo"
# Live logs
ssh root@91.98.205.156 "pm2 logs wellnuo-api"
# Check health
curl https://wellnuo.smartlaunchhub.com/health
```