Commit graph

9 commits

Author SHA1 Message Date
Vadym Samoilenko
3077159da3 Fix redirect loop and login redirect for /ppt-tool deployment
- Add basePath/assetPrefix to next.config.mjs (was only patched on server)
- Fix AuthGuard to use router.push('/login') instead of window.location.href
  (window.location ignores Next.js basePath, sent users to /login not /ppt-tool/login)
- Remove deploy.sh Step 10 deckforge.conf creation — DeckForge rules are now
  merged into optical-dev.oliver.solutions.conf alongside OliVAS config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:57:45 +00:00
Vadym Samoilenko
40c22e8d47 Fix: add retry loop for API health check (same as frontend)
API takes time to initialize — immediate curl always fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:27:41 +00:00
Vadym Samoilenko
5c052e718d Fix deploy port conflict: auto-detect free port + persist to .env
- Read API/WEB/PG/REDIS ports from .env on startup (Docker Compose
  loads .env directly, shell exports are ignored by it)
- check_port: auto-find next free port instead of interactive prompt
- set_env_port: write chosen port back to .env so it persists across runs
- port_taken_by_other: use 'ss | grep' instead of ss sport filter (more reliable)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:25:16 +00:00
Vadym Samoilenko
2b31281be5 Fix Google LB health check: serve 200 on GET / instead of 302
Google Cloud LB marks backend unhealthy when GET / returns 302.
Serve /var/www/html/index.html (meta-redirect to /ppt-tool/) for root
so health check gets 200 OK and traffic flows through.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:22:31 +00:00
Vadym Samoilenko
be052db7af Fix domain typo: oliver.solution → oliver.solutions everywhere
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:06:09 +00:00
Vadym Samoilenko
32aea6e1a6 Fix deploy: wait up to 2min for Next.js frontend to start before health check
Next.js SSR takes 30-60s to compile on first boot — immediate curl check
always fails. Now retries every 5s for up to 24 attempts (2 minutes).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 21:02:40 +00:00
Vadym Samoilenko
1fe15a1cec Fix port check: only allow our own compose containers, not any Docker
Previously any Docker process on the port was treated as safe.
Now uses docker inspect on our project's containers specifically,
so ports used by other apps on the server trigger the conflict prompt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:25:48 +00:00
Vadym Samoilenko
e33fec5353 Fix deploy.sh: run as normal user, sudo only for privileged ops
Removes root check; uses sudo internally for apt/apache/ufw commands
so git pull and docker commands run as the invoking user (with correct
SSH keys and docker group membership).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:17:09 +00:00
Vadym Samoilenko
7c8b8cd369 Add production deploy script and Apache/Docker config
- deploy.sh: idempotent 12-step deploy for Ubuntu (prereqs, port
  conflict check, basePath patch, build, migrate, Apache + UFW setup)
- docker-compose.prod.yml: prod overrides (127.0.0.1 bindings, no nginx)
- apache/deckforge.conf: reverse proxy template with SSE support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 19:15:19 +00:00