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

Enable nitro payment integration using an env var #26

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

lalexgap
Copy link

@lalexgap lalexgap commented Jul 12, 2023

Fixes #25

Currently in our nitro-integration branch we modify the entrypoint for booster-http to always enable nitro . This means our branch basically requires a nitro rpc server setup if you're running the dockerized booster http, which is not very pratical.

This PR updates the docker compose so the env var BOOSTER_HTTP_NITRO_ENABLED can be used to enable the nitro integration. The default behavior, if that env var is not set, is to assume no nitro integration. I've also added BOOSTER_HTTP_NITRO_ENDPOINT, which defaults to host.docker.internal:4007/api/v1. This can be used if there's a different endpoint we want to use for some reason.

With these changes we now need to set BOOSTER_HTTP_NITRO_ENABLED when triggering docker compose if we want to enable the nitro payment integration. To do so you just need to set BOOSTER_HTTP_NITRO_ENABLED=true when calling compose. IE:

BOOSTER_HTTP_NITRO_ENABLED=true make devnet/up
BOOSTER_HTTP_NITRO_ENABLED=true docker compose -f ./docker/devnet/docker-compose.yaml up -d

@@ -80,6 +80,8 @@ services:
- BOOST_PATH=/var/lib/boost
- LOTUS_PATH=/var/lib/lotus
- LOTUS_MINER_PATH=/var/lib/lotus-miner
- BOOSTER_HTTP_NITRO_ENABLED=${BOOSTER_HTTP_NITRO_ENABLED:-false}
Copy link
Author

Choose a reason for hiding this comment

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

The :- syntax lets us provide a default value if the env var is not set.

@lalexgap lalexgap changed the title EEnv var now controls whether the nitro integration is enabled or not in booster http Enable nitro payment integration using an env var Jul 12, 2023
Copy link

@geoknee geoknee left a comment

Choose a reason for hiding this comment

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

Looks good.

This prompts me to think that we need some docs to explain to boost users:

  • how to enable nitro
  • what that means / enables for them.

Perhaps we should make an issue to cover this. I believe the boost maintainers are going to want to see that before considering our work.

@lalexgap lalexgap merged commit 8a16d31 into nitro-integration Jul 13, 2023
@geoknee geoknee deleted the enable-with-env-var branch July 13, 2023 20:15
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.

Don't enable nitro integration by default
2 participants