- Add DEPLOYMENT-CHECKLIST.md with step-by-step guide - Add frontend/.env.production for build - Update .env.fastapi.example with correct REDIRECT_URI - Include all verification steps and troubleshooting Ready for production deployment! Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
3.3 KiB
3.3 KiB
Deployment Checklist - Oliver Metadata Tool v4.0
✅ Pre-Deployment
1. Backend .env Configuration
cd /opt/solventum-image-metadata
sudo cp .env.production .env
sudo nano .env
Required variables:
SECRET_KEY=<generate-with-python-secrets>
OPENAI_API_KEY=sk-...
AZURE_CLIENT_SECRET=<your-secret>
Verify Azure AD settings:
AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
AZURE_TENANT_ID=e519c2e6-bc6d-4fdf-8d9c-923c2f002385
REDIRECT_URI=https://ai-sandbox.oliver.solutions/solventum-image-metadata/
2. Apache Configuration
Add to /etc/apache2/sites-available/solventum-image-metadata.conf:
# Frontend - static files
Alias /solventum-image-metadata /var/www/html/solventum-image-metadata
<Directory /var/www/html/solventum-image-metadata>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteBase /solventum-image-metadata
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/solventum-image-metadata/api/
RewriteRule ^ /solventum-image-metadata/index.html [L]
</Directory>
# Backend API
ProxyPass /solventum-image-metadata/api/ http://localhost:5001/
ProxyPassReverse /solventum-image-metadata/api/ http://localhost:5001/
ProxyTimeout 600
Enable modules:
sudo a2enmod rewrite alias proxy proxy_http
sudo apache2ctl configtest
sudo systemctl reload apache2
✅ Deployment
cd /opt/solventum-image-metadata
git pull origin main
sudo ./deploy.sh
✅ Verification
1. Check Backend
curl http://localhost:5001/health
# Expected: {"status":"healthy"}
2. Check Frontend
curl https://ai-sandbox.oliver.solutions/solventum-image-metadata/
# Expected: HTML with React app
3. Check API through Apache
curl https://ai-sandbox.oliver.solutions/solventum-image-metadata/api/health
# Expected: {"status":"healthy"}
4. Test SSO
- Go to: https://ai-sandbox.oliver.solutions/solventum-image-metadata/
- Click "Login with Microsoft"
- Should redirect to Azure AD
- After login, should return to dashboard
5. Test File Upload
- Login to dashboard
- Select "Manual Entry" or "AI Generation"
- Drag & drop a PDF file
- Edit metadata (title, subject, keywords)
- Click "Save Metadata"
- Download file
- Verify:
exiftool downloaded.pdf
📊 Final Status
- Backend running on port 5001
- Redis running in Docker
- Frontend deployed to /var/www/html/solventum-image-metadata
- Apache configured with Alias and ProxyPass
- .env configured with all secrets
- SSO redirect to Azure AD working
- SSO callback to dashboard working
- File upload working
- Metadata editing working
- Download working
🆘 Troubleshooting
Backend not starting
docker logs oliver-backend --tail 100
Frontend 404
ls -la /var/www/html/solventum-image-metadata/
# Should contain: index.html, assets/, etc.
SSO redirect loop
# Check .env REDIRECT_URI matches Azure AD exactly
grep REDIRECT_URI /opt/solventum-image-metadata/.env
# Must be: https://ai-sandbox.oliver.solutions/solventum-image-metadata/
API 404 errors
# Check Apache proxy
sudo apache2ctl -S | grep solventum
# Check backend is running
curl http://localhost:5001/docs