Skip to content

Add GeoChem hosting: proxy to Jataware-hosted instance - #8

Open
saggu wants to merge 2 commits into
mainfrom
geochem/hosting
Open

Add GeoChem hosting: proxy to Jataware-hosted instance#8
saggu wants to merge 2 commits into
mainfrom
geochem/hosting

Conversation

@saggu

@saggu saggu commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • GeoChem HMI is hosted externally by Jataware/USGS at https://proxy.usgs.geochem.jataware.ai/ — no local container to build/run.
  • /geochem/ nginx location does a literal-URI proxy_pass to that host (so the /geochem/ prefix is stripped before forwarding — the upstream has no concept of it), plus a location = /geochem redirect to /geochem/.
  • Websocket upgrade headers (Upgrade/Connection, via a new map $http_upgrade $connection_upgrade in the http block) for the chat agent at /geochem/api/chat/ws, client_max_body_size 200M for curator PDF uploads, proxy_ssl_server_name on for SNI, and an explicit Host header override to the upstream's real hostname (our LB routes by Host, so $host would 404).
  • Removed the placeholder geochem service from docker-compose.yml — nothing to build, so no mms/build.py entry either.

Test plan

  • nginx -t against a scratch copy (dummy certs, internal Docker hostnames neutralized) validates the full config cleanly end-to-end
  • Ran the actual config in a container and hit it live against the real Jataware endpoint: GET /geochem → 301 to /geochem/; GET /geochem/ → 200 with the real GeoChem Curation app HTML; GET /geochem/favicon.svg → 200, confirming prefix-stripping works for sub-resources too
  • docker-compose.yml YAML parses correctly

🤖 Generated with Claude Code

https://claude.ai/code/session_01KxZ4CixRWDzd9qGzJVBywr

amandeep and others added 2 commits September 3, 2026 14:37
/geochem and /geochem/ nginx location blocks, mirroring /dashboard's
set \$upstream pattern (not the /api/-style direct proxy_pass, which
resolves hostnames at config-load time rather than via the resolver
directive). New geochem service in docker-compose.yml.

Image name (minmod-geochem) and port (8060) are placeholders pending
Ryan's actual container details -- see docs/GEOCHEM-HMI-INTEGRATION-SPEC
issue on ta2-table-understanding.

Verified: nginx -t against a scratch copy with machine-local paths/
certs substituted parses and validates cleanly past the new blocks;
the only remaining failure (DNS resolution of Docker-network hostnames
outside the docker network) is pre-existing and identical in the
unmodified original file. docker-compose.yml's YAML parses correctly
with all 8 services present.
Ryan's GeoChem HMI is hosted externally at
https://proxy.usgs.geochem.jataware.ai/ (run by Jataware/USGS), not a
container we build/run ourselves. Replaces the placeholder
minmod-geochem:8060 docker-compose service and its two-block nginx
proxy_pass (which used the set $upstream pattern for Docker-internal
DNS timing) with a single /geochem/ location doing a literal-URI
proxy_pass to the real external host, plus a /geochem -> /geochem/
redirect. Literal URI is required (not the file's usual set $upstream
+ bare proxy_pass idiom) so nginx strips the /geochem/ prefix before
forwarding -- the upstream has no concept of that prefix. Adds
websocket upgrade headers for the chat agent's /geochem/api/chat/ws
and a 200M client_max_body_size for curator PDF uploads.

Verified: nginx -t against a scratch copy (dummy certs, internal
Docker hostnames neutralized) validates cleanly end-to-end. Ran the
actual config in a container and hit it live: GET /geochem -> 301 to
/geochem/; GET /geochem/ -> 200 with the real GeoChem Curation app
HTML; GET /geochem/favicon.svg -> 200, confirming prefix-stripping
works for sub-resources, not just the location root.
@saggu saggu changed the title Add GeoChem hosting: nginx routes + compose service Add GeoChem hosting: proxy to Jataware-hosted instance Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant