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

Configure HTTP_PORT and WS_PORT via environment variables #2832

Merged

Conversation

Charles-Johnson
Copy link
Contributor

This should resolve issue #2829.

node/src/opt.rs Outdated
@@ -124,6 +125,7 @@ pub struct Opt {
long,
default_value = "8020",
value_name = "PORT",
env = "WS_PORT",
Copy link
Contributor

@maoueh maoueh Oct 4, 2021

Choose a reason for hiding this comment

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

This seems wrongly placed. This is for the JSON-RPC of the admin API ...

Choose a reason for hiding this comment

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

you're looking for the one with a default of 8001. Also, how does this change the graphiql web ui to use the new port?

Choose a reason for hiding this comment

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

Looks like the port is divined from configuration, so it should work fine once this points to the right option: https://github.com/graphprotocol/graph-node/blob/master/server/http/src/service.rs#L120

Copy link
Contributor Author

@Charles-Johnson Charles-Johnson Oct 18, 2021

Choose a reason for hiding this comment

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

@numonedad it looks like the HTTP_PORT is possibly taken care of in the graphiql web ui by using window.location.pathname here so I presumably just need to worry about the WS_PORT for the ui?

Choose a reason for hiding this comment

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

I think it's passed along fine, we just need a way to configure WS_PORT when starting graph_node

node/src/opt.rs Outdated
@@ -110,6 +110,7 @@ pub struct Opt {
long,
default_value = "8030",
value_name = "PORT",
env = "HTTP_PORT",
Copy link
Contributor

Choose a reason for hiding this comment

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

This one also it appears.

@maoueh
Copy link
Contributor

maoueh commented Oct 16, 2021

@Charles-Johnson Are you going to update your PR?

@Charles-Johnson
Copy link
Contributor Author

Sorry @maoueh , I've been occupied by work and family for the last 2 weeks. I need still need to find some time to understand the proper fix

@maoueh
Copy link
Contributor

maoueh commented Oct 18, 2021

@Charles-Johnson Didn't wanted to put pressure here, sorry if it felt that way. Just wanted to ensure this was still active :)

@Charles-Johnson
Copy link
Contributor Author

Sorry I realised that I edited the wrong macro 😅 . It's a little confusing because there's no spatial grouping of the macro and struct field definition. Anyway I will update

@Charles-Johnson Charles-Johnson force-pushed the Charles-Johnson-fix-for-#2829 branch from 1586adb to f76e6cc Compare October 18, 2021 21:06
@maoueh
Copy link
Contributor

maoueh commented Jan 19, 2022

Sorry for such long delay, completely forgot. Would you have time to change HTTP_PORT to GRAPH_GRAPHQL_HTTP_PORT and WS_PORT GRAPH_GRAPHQL_WS_PORT just to bring a bit more clarity about the usage of those two and add quick list items in https://github.com/graphprotocol/graph-node/blob/master/docs/environment-variables.md#graphql about those new 2.

@evaporei
Copy link
Contributor

@Charles-Johnson @maoueh will this be continued? Otherwise I would "vote" for closing it.

@maoueh
Copy link
Contributor

maoueh commented Mar 21, 2022

@otaviopace I'll take care of bringing it in.

@Charles-Johnson
Copy link
Contributor Author

@maoueh just looking into the quick list items now

merge latest changes from master and document environment variables
@Charles-Johnson
Copy link
Contributor Author

@maoueh I made the requested changes

Copy link
Collaborator

@leoyvens leoyvens left a comment

Choose a reason for hiding this comment

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

Looks like the review was addressed, thanks @Charles-Johnson

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.

5 participants