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

IPFS_API environment variable #7583

Open
kallisti5 opened this issue Aug 8, 2020 · 3 comments
Open

IPFS_API environment variable #7583

kallisti5 opened this issue Aug 8, 2020 · 3 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked

Comments

@kallisti5
Copy link

Instead of passing --api="/ip4/192.168.1.10/tcp/45001" to ipfs every execution, it would be nice if it accepted an environment variable for this setting.

IPFS_API or something similar. This would likely be handy when running ipfs in docker containers connecting to a central node as well.

IPFS_PATH is already offered... so seems like a reasonable request.

@kallisti5 kallisti5 added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 8, 2020
@welcome
Copy link

welcome bot commented Aug 8, 2020

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@Stebalien
Copy link
Member

Note: you can also create a ~/.ipfs/api file with the correct API path. But I agree that an environment variable would be nice.

@jacobheun jacobheun added the status/ready Ready to be worked label Aug 14, 2020
@zaibon
Copy link

zaibon commented Sep 15, 2020

I did a quick search to see where we could hook this environment variable. It seem we could modify https://github.com/ipfs/go-ipfs/blob/48b2f1273af310934d0e2334ce5460712e706200/cmd/ipfs/main.go#L193-L199
to also check IPFS_API if the --api flag is not given.

I guess we want the flag to have precedence over the environment variable?
If this plan sounds good I can work on a PR for it.

zaibon added a commit to zaibon/go-ipfs that referenced this issue Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

4 participants