Skip to content

Commit

Permalink
Tweak Veloserver proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Feb 6, 2025
1 parent 9b18ff6 commit ccad35a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 2 additions & 3 deletions adjacent-servers/adjacent-servers-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,12 @@ function initAdjacentServersProxy(app, isDocker, ensureAdmin) {
ensureAdmin(false, false, true), // true to allow all GETs - others require admin auth
createProxyMiddleware({
target: `http://${isDocker ? "veloserver" : "localhost"}:${
process.env.VELOSERVER_PORT || 8885
process.env.VELOSERVER_PORT || 8104
}`,
changeOrigin: true,
pathRewrite: {
[`^${process.env.ROOT_PATH || ""}/titilerpgstac`]: "",
[`^${process.env.ROOT_PATH || ""}/veloserver`]: "",
},
selfHandleResponse: true,
})
);
}
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ services:
- ./Missions:/Missions
- ./adjacent-servers/docker-scripts:/tmp/scripts

veloserver:
image: ghcr.io/nasa-ammos/veloserver:development
ports:
- 8104
restart: on-failure

db:
image: postgis/postgis:16-3.4-alpine
env_file: .env
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/Setup/ENVs/ENVs.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,4 @@ Veloserver - Velocity and Wind Data Visualization Server - https://github.com/NA

#### `VELOSERVER_PORT=`

Port to proxy veloserver on | default `8885`
Port to proxy veloserver on | default `8104`
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WITH_TITILER_PGSTAC=true
TITILER_PGSTAC_PORT=8884
# Veloserver - Velocity and Wind Data Visualization Server - https://github.com/NASA-AMMOS/Veloserver
WITH_VELOSERVER=true
VELOSERVER_PORT=8885
VELOSERVER_PORT=8104

# Sets the Content-Security-Policy: frame-ancestors header to allow the embedding in external sites. default null, ex: FRAME_ANCESTORS='["https://*.jpl.nasa.gov"]'
FRAME_ANCESTORS=
Expand Down

0 comments on commit ccad35a

Please sign in to comment.