Subpath-aware deploy for /adeo-maturity/ behind the shared optical-dev vhost. Auto-picks a free host port (prefers 3102, scans 3102-3199) and persists it to .env so re-deploys are idempotent. Renders the Apache conf from a template on each run. - script.js: detect URL prefix at load time and prepend it to all /api/ calls, so the same code works at the root locally and under a sub-path behind Apache. - Dockerfile: fix broken package.json copy (lives at repo root, not server/) and install python3 + reportlab + openpyxl for the sync/ import/PDF endpoints that shell out. - docker-compose: pin top-level name (per global docker policy), configurable host port, bind 127.0.0.1 only. - deploy/: new deploy.sh + apache-adeo.conf.tmpl. Old root deploy.sh removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
1.4 KiB
Cheetah
32 lines
1.4 KiB
Cheetah
# adeo-maturity-tool — Apache reverse-proxy block (template).
|
|
#
|
|
# This file is the template. The actual `apache-adeo.conf` next to it is
|
|
# generated by `deploy/deploy.sh` on every run, with the chosen app port
|
|
# substituted in. apache-adeo.conf is gitignored.
|
|
#
|
|
# Drop into the merged optical-dev.oliver.solutions vhost via Include:
|
|
# Include /opt/adeo-maturity-tool/deploy/apache-adeo.conf
|
|
#
|
|
# Architecture differs from /oliver-sales-ops-platform/:
|
|
# - A single Express container serves BOTH the API and the static
|
|
# frontend (index.html, script.js) on 127.0.0.1:__APP_PORT__.
|
|
# - Apache proxies the entire path prefix to that one container — there
|
|
# is no SPA-on-disk Alias, no separate /api ProxyPass.
|
|
#
|
|
# The frontend (script.js) auto-detects the URL prefix at page load and
|
|
# prepends it to all /api/ calls, so the same code works at the root
|
|
# (`/`) when run locally and at `/adeo-maturity/` behind Apache.
|
|
#
|
|
# Public URL:
|
|
# https://optical-dev.oliver.solutions/adeo-maturity/
|
|
|
|
ProxyTimeout 300
|
|
TimeOut 300
|
|
|
|
# Force the trailing slash so relative asset paths in index.html resolve
|
|
# correctly when a user visits the bare /adeo-maturity URL.
|
|
RedirectMatch ^/adeo-maturity$ /adeo-maturity/
|
|
|
|
# App (API + static, single container)
|
|
ProxyPass /adeo-maturity/ http://127.0.0.1:__APP_PORT__/ timeout=300
|
|
ProxyPassReverse /adeo-maturity/ http://127.0.0.1:__APP_PORT__/
|