Files
vantage/deploy/docker-compose.site.yml
T
mrhid6andClaude Opus 5 b209fed4a7 fix(deploy): ADMIN_ORIGIN must list the marketing site too
/start now posts account signups straight to admin, so the browser sends
a cross-origin preflight from vantage.hostxtra.co.uk. With only the
console origin in ADMIN_ORIGIN it was refused.

The failure mode is worth naming: cors() omits Access-Control-Allow-Origin
but still answers the preflight 204, so the browser blocks the request and
admin logs nothing. It looks like the endpoint is down when curl says it
is fine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 14:02:25 +01:00

74 lines
3.0 KiB
YAML

services:
# Adds to the base `server` service defined in docker-compose.yml —
# only the cloud deployment reaps abandoned Free instances.
server:
environment:
FREE_INSTANCE_REAP_AFTER: "336h"
site:
image: gitea.hostxtra.co.uk/mrhid6/vantage/site:latest
restart: unless-stopped
ports:
- 3003:3000
depends_on:
- sitesvc
sitesvc:
image: gitea.hostxtra.co.uk/mrhid6/vantage/sitesvc:latest
restart: unless-stopped
ports:
- 8082:8082
environment:
PORT: "8082"
MONGO_URI: ${MONGO_URI:-}
PUBLIC_URL: ${PUBLIC_URL:-}
SITE_ORIGIN: ${SITE_ORIGIN:-}
TRUST_PROXY: ${SITE_TRUST_PROXY:-false}
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_USERNAME: ${SMTP_USERNAME:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM: ${SMTP_FROM:-}
SMTP_TO: ${SMTP_TO:-support@hostxtra.co.uk}
admin:
image: gitea.hostxtra.co.uk/mrhid6/vantage/admin:latest
restart: unless-stopped
ports:
- 8083:8083
environment:
PORT: "8083"
ADMIN_MONGO_URI: ${ADMIN_MONGO_URI:-}
CONTROL_MONGO_URI: ${MONGO_URI:-}
REDIS_ADDR: ${REDIS_ADDR:-10.10.10.2:6379}
REDIS_USERNAME: ${REDIS_USERNAME:-}
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
LICENSE_SIGNING_KEY: ${LICENSE_SIGNING_KEY:-}
PUBLIC_URL: ${ADMIN_PUBLIC_URL:-}
# Comma-separated, and it needs BOTH browser origins that call admin:
# vantage-hq (the console) and the marketing site, whose /start form
# posts account signups here. An origin missing from this list is not
# a 403 — admin omits the CORS header entirely and the browser blocks
# the preflight, so the form fails with nothing in admin's logs.
# ADMIN_ORIGIN="https://vantage-hq.hostxtra.co.uk,https://vantage.hostxtra.co.uk"
ADMIN_ORIGIN: ${ADMIN_ORIGIN:-}
TRUST_PROXY: ${TRUST_PROXY:-true}
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_USERNAME: ${SMTP_USERNAME:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM: ${SMTP_FROM:-}
APP_LOGIN_URL: ${APP_LOGIN_URL:-}
FREE_INSTANCE_REAP_AFTER: "336h"
# The staff and customer console, served at vantage-hq.hostxtra.co.uk.
# ADMIN_API_URL is baked into the image at build time, not read here, so
# changing it needs a rebuild rather than a restart — and it must appear in
# admin's ADMIN_ORIGIN above or the browser blocks every request.
adminsite:
image: gitea.hostxtra.co.uk/mrhid6/vantage/adminsite:latest
restart: unless-stopped
ports:
# 3000 is web, 3003 is the marketing site; this takes 3004.
- 3004:3000
depends_on:
- admin
networks: {}