Commit graph

11 commits

Author SHA1 Message Date
Vadym Samoilenko
8c5146022a deploy.sh: run seed_model_pricing.py after container startup
Without this step the model_pricing collection is empty and all LLM
costs are recorded as $0. Seed is idempotent — safe on every deploy.
Also wait for backend container readiness before running migrations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:10:12 +01:00
Vadym Samoilenko
2154ce946d Add COOP header to Apache config — fix MSAL popup window.closed blocking
same-origin-allow-popups allows the Microsoft auth popup to communicate
back to the parent window, which is required for loginPopup to work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 14:25:00 +00:00
Vadym Samoilenko
7f0df54de3 Fix domain typo: oliver.solution → oliver.solutions across all files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:40:00 +00:00
Vadym Samoilenko
b481f616cb Single deploy.sh for server — frontend build via Node Docker container
- deploy.sh runs entirely on server, no local Mac needed
- docker-compose: add 'frontend' service (node:20-alpine, profile=build)
  builds frontend and copies dist/ to /var/www/html/semblance
- Remove server-deploy.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:26:39 +00:00
Vadym Samoilenko
4a6b4d6fe0 Dockerize backend — replace systemd service with docker-compose
- Add backend/Dockerfile (python:3.12-slim)
- Add docker-compose.yml (backend :5137 + mongo:7)
- Add backend/.dockerignore
- Rewrite deploy.sh: build frontend locally, rsync dist/, docker compose up --build
- Remove semblance.service (no longer needed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 13:21:34 +00:00
Vadym Samoilenko
42a8f25510 Adapt deploy.sh for optical-dev server infrastructure
- Build frontend locally (Node not installed on server)
- rsync dist/ to server instead of building remotely
- Change PYTHON_CMD to python3 (server has 3.12, not 3.13)
- Add step to start MongoDB in Docker (mongo:7, not installed natively)
- Add step to inject Apache proxy config for /semblance_back/ and /semblance/
- SSH_HOST=optical-dev (uses ~/.ssh/config alias)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 12:59:32 +00:00
Vadym Samoilenko
3e1865edbd Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed
- Fix missing await on FocusGroup.get_messages() (N-L1)
- Replace time.sleep with asyncio.sleep in key_theme_service and focus_group_service (N-P10)
- Replace flask import with quart in focus_groups.py (N-S3)
- Add logger.error before all 500 returns in focus_groups.py (N-P6)
- Add logging to silent except blocks across routes (N-M10, N-M11)
- Add @rate_limit to 6 remaining AI endpoints (N-H4)
- Add --confirm flag to populate scripts before delete_many (S-H2)
- Remove hardcoded Azure ID fallbacks from msal_service.py and msalConfig.ts (A-M2, F-H4)
- Centralize make_serializable() in utils.py, remove duplicates from 3 route files (N-P7)
- Replace all datetime.utcnow() with datetime.now(timezone.utc) across entire backend (M-L2)
- AuthContext.tsx: only mark token validated on 200 success, not on non-401 errors (F-H2)
- Rename authType → auth_type in auth.py (N-S4)
- Add security_report.md and security_report.pdf with full 92-finding status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 12:51:18 +00:00
Vadym Samoilenko
bf5e74fe49 Revert sudo on frontend deploy steps — fix ownership on server instead
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 17:42:10 +00:00
Vadym Samoilenko
75b97f8c88 Fix permission denied errors in deploy script by using sudo for frontend file operations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 17:41:06 +00:00
michael
a6e1a8a307 Add backend directory creation to deploy script
Creates uploads/ and temp/ directories with correct ownership
before restarting the service, fixing systemd namespace errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 11:43:03 -06:00
michael
a32512a8f4 Add deployment script for git-based deployments
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 11:13:37 -06:00