Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Added NB_QUERY_URL_PATH #69

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ services:
environment:
NB_API_QUERY_URL: ${NB_API_QUERY_URL}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thought: I'm realizing that the name NB_API_QUERY_URL is pretty confusing and ambiguous in terms of whether it points to the query tool or API, now that we also have NB_QUERY_URL_PATH.

We should probably consider renaming NB_API_QUERY_URL to sth clearer, either as part of #30 or the issue concerning query tool -> f-API or query tool -> n-API. Maybe you can link this PR there, or vice versa, once the issue is open? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to be addressed in #30 but we can also discuss it in neurobagel/query-tool#225

NB_IS_FEDERATION_API: "true"
NB_QUERY_URL_PATH: ${NB_QUERY_URL_PATH:-/}
NB_ENABLE_AUTH: ${NB_ENABLE_AUTH:-false}
NB_QUERY_CLIENT_ID: ${NB_QUERY_CLIENT_ID}

Expand All @@ -88,6 +89,7 @@ services:
environment:
NB_API_QUERY_URL: ${NB_API_QUERY_URL}
NB_IS_FEDERATION_API: "false"
NB_QUERY_URL_PATH: ${NB_QUERY_URL_PATH:-/}
NB_ENABLE_AUTH: ${NB_ENABLE_AUTH:-false}
NB_QUERY_CLIENT_ID: ${NB_QUERY_CLIENT_ID}

Expand Down
1 change: 1 addition & 0 deletions docs/neurobagel_environment_variables.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ Environment variable Set manually in .env? Description Default value if not set
`NB_QUERY_TAG` No Docker image tag for the query tool `latest` Docker
`NB_QUERY_PORT_HOST` No Port number used by the `query_tool` on the host machine `3000` Docker
`NB_FEDERATE_REMOTE_PUBLIC_NODES` Yes If "True", include public nodes in federation `true` Docker, Python
`NB_QUERY_URL_PATH` No The URL path for the query tool, determines the specific URL at which the app should be rendered for users to access it `/` Docker
`NB_ENABLE_AUTH` Yes **(Experimental, for dev deployments only)** Whether to enable authentication for cohort queries. One of [true, false] `false` Docker, Python
`NB_QUERY_CLIENT_ID` Yes **(Experimental, for dev deployments only)** OAuth client ID for the query tool. Required if NB_ENABLE_AUTH is set to true. - Docker, Python
3 changes: 3 additions & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ NB_RETURN_AGG=true
NB_API_QUERY_URL=http://XX.XX.XX.XX

# Additional configurable parameters - uncomment to change the defaults
# Change NB_QUERY_URL_PATH if you're using a proxy server (NGINX, Caddy, etc.) and have configured it so that the query tool is accessible at a path other than the root (`/`).
# e.g., if your proxy server is set up so that mynode.org/querytool points to the query tool, you would set NB_QUERY_URL_PATH=/querytool
# NB_QUERY_URL_PATH=/
# Change NB_QUERY_PORT_HOST if port 3000 is already in use on the machine
# NB_QUERY_PORT_HOST=3000
# NB_QUERY_TAG=latest
Expand Down