https://github.com/mattn/etcdenv
https://github.com/mattn/etcdenv
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattn/etcdenv
- Owner: mattn
- License: mit
- Created: 2013-08-19T06:53:27.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-24T22:57:30.000Z (almost 11 years ago)
- Last Synced: 2025-04-15T12:18:47.789Z (9 months ago)
- Language: Go
- Size: 276 KB
- Stars: 142
- Watchers: 9
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkd
- License: LICENSE
Awesome Lists containing this project
README
# etcdenv
etcd + env = awesome!
env command integrated with [etcd](http://coreos.com/docs/etcd/) server
## Usage
$ curl http://127.0.0.1:4001/v1/keys/app/db -d value="newdb"
$ curl http://127.0.0.1:4001/v1/keys/app/cache -d value="new cache"
$ curl http://127.0.0.1:4001/v1/keys/app2/db -d value="otherdb"
$ curl http://localhost:4001/v1/keys/app
[{"action":"GET","key":"/app/db","value":"newdb","index":4},{"action":"GET","key":"/app/cache","value":"new cache","index":4}]
$ etcdenv -key=/app/
DB=newdb
CACHE=new cache
$ etcdenv -key=/app/ ruby web.rb
$ etcdenv -key=/ -r
DB=newdb,otherdb
CACHE=new cache
### Shebang
$ cat myapp.sh
#!/path/to/etcdenv -key=/myapp ./myapp.sh
If you are using OSs which the shell doesn't parse arguments separated with spaces, try to use `-s` option.
$ cat myapp.sh
#!/path/to/etcdenv -s -key=/myapp ./myapp.sh
### Foreman/Goreman
$ cat Procfile
web: etcdenv -key=/myapp/ ruby web.rb
## License
MIT: http://mattn.mit-license.org/2013