Enable env var configuration of go-ipfs daemon
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
The IPFS daemon should be able to be configured via environment variables on top of the existing file based method. The environment variables would override any pre-existing configuration in the config file. Ideally, there would be an env var associated with every available configuration value, second best, there is a env var value for each section of the configuration file. For simplicity, there would be no 'merge' functionality, but a simple replace semantic, so for example, with a `Addressess.Swarm` value of
```json
{
"Addresses": {
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip4/127.0.0.1/tcp/4001"
]
}
}
```
to add a value to the list of swarm addresses, we need to pass all the values we want, i.e.
```bash
$ env IPFS_ADDRESSES_SWARM=("/ip4/0.0.0.0/tcp/4001" "/ip4/127.0.0.1/tcp/4001" "/ip6/::/tcp/4001") ipfs daemon
```
This enhancement would enable for `go-ipfs` to be deployed to cloud-native infrastructure in a much simpler manner than is currently possible. Note, that this change is not enough by itself to reach this goal, related to this is issue #6262.
Contributor guide
Assessment
This issue has not been assessed yet.