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>
21 lines
421 B
Docker
21 lines
421 B
Docker
FROM node:20-alpine
|
|
|
|
# Python is required by the API endpoints that shell out to convert_data.py,
|
|
# import_file.py, and pdf_generator.py.
|
|
RUN apk add --no-cache python3 py3-pip py3-reportlab py3-openpyxl
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --only=production
|
|
|
|
COPY server/ ./server/
|
|
COPY index.html script.js ./
|
|
COPY *.py ./
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3102
|
|
|
|
EXPOSE 3102
|
|
|
|
CMD ["node", "server/index.js"]
|