Commit graph

8 commits

Author SHA1 Message Date
SamoilenkoVadym
77494488d5 feat(deploy): add auto git pull and cleanup to deployment script
- Auto pull latest code before deployment
- Clean old Docker images before building new ones
- Add comprehensive cleanup commands documentation
- Add production deployment guide
- Fix frontend serving from /var/www/html for production
- Preserve build cache for faster deployments

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 15:40:11 +00:00
SamoilenkoVadym
c986470543 fix(deploy): return to script directory before docker-compose commands
- cd back to SCRIPT_DIR before running docker-compose logs/ps
- Fixes "no such file" error when running from frontend/ directory

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:52:33 +00:00
SamoilenkoVadym
34594b64b4 fix(docker): isolate Redis within Docker network
- Add Redis container back (no external port exposure)
- Redis only accessible within Docker network
- Backend connects via redis://redis:6379/0
- Simplify Redis health check in deploy.sh

This avoids port conflicts while keeping Redis in Docker.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:39:19 +00:00
SamoilenkoVadym
9fd8581dd4 fix(config): use port 5001 for Azure AD compatibility
- Change BACKEND_PORT from 8001 to 5001 (same as Flask)
- Keeps existing Azure AD redirect URI working
- No need to update Azure AD app registration
- Apache proxy can use same port configuration

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:29:45 +00:00
SamoilenkoVadym
0d706fe79b fix(config): change backend port to 8001 (port 8000 occupied on server)
- Make BACKEND_PORT configurable via .env
- Update docker-compose to use ${BACKEND_PORT:-8001}
- Update deploy.sh to read port from .env
- Update Apache config examples to use port 8001
- Update all documentation with correct port

Apache config must proxy:
  /solventum-image-metadata/api → http://localhost:8001

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:26:51 +00:00
SamoilenkoVadym
a95f7be047 feat(deploy): add production deployment for Ubuntu with Docker
- Create idempotent deploy.sh for production deployment
- Add docker-compose.fastapi.yml with Redis + Backend
- Configure health checks for all services
- Add .env.fastapi.example with all configuration
- Remove old Flask deployment script (docker-run.sh)

Deployment features:
- Pre-flight checks (Docker, Node, permissions)
- Frontend build with Vite
- Deploy to /var/www/html/solventum-image-metadata
- Graceful container restart
- Health checks (backend + Redis)
- Auto-cleanup old Docker images

Usage:
  cd /opt/solventum-image-metadata
  git pull origin main
  sudo ./deploy.sh

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:15:04 +00:00
SamoilenkoVadym
26095be769 Remove git pull from deploy script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:26:12 +00:00
SamoilenkoVadym
189cb3dab3 Add deployment script and configure reverse proxy with Azure SSO
- Add deploy.sh for idempotent Docker deployments
- Configure API_BASE for /solventum-image-metadata-back/ reverse proxy
- Enable Azure AD SSO with public client flow (no secret required)
- Remove hardcoded tester user for production security
- Add ProxyFix middleware for reverse proxy header handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 16:37:19 +00:00