mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Add example for flags with dot in their name
parent
634c42547e
commit
fe57a29228
|
@ -1,8 +1,9 @@
|
||||||
# Environment Variables
|
# Environment Variables
|
||||||
You can use environment variables instead of arguments for `weed`.
|
You can use environment variables instead of arguments for `weed`.
|
||||||
For example:
|
For example:
|
||||||
instead of `weed master -port 5000 -mdir /tmp -volumePreallocate` you can use
|
instead of `weed master -port 5000 -mdir /tmp -volumePreallocate -ip.bind 0.0.0.0` you can use
|
||||||
```shell
|
```shell
|
||||||
|
export IP_BIND=0.0.0.0
|
||||||
export PORT=5000
|
export PORT=5000
|
||||||
export MDIR=/tmp
|
export MDIR=/tmp
|
||||||
export VOLUMEPREALLOCATE=true # or export VOLUMEPREALLOCATE=
|
export VOLUMEPREALLOCATE=true # or export VOLUMEPREALLOCATE=
|
||||||
|
@ -17,7 +18,7 @@ This is useful for using docker and docker compose
|
||||||
You have to override entrypoint to `weed` because defautl [entrypoint](https://github.com/seaweedfs/seaweedfs/blob/master/docker/entrypoint.sh) use default values for `volumeSizeLimitMB`, `volumePreallocate`, `mdir`, `dir`, and `max` and setting environment variables won't change these values.
|
You have to override entrypoint to `weed` because defautl [entrypoint](https://github.com/seaweedfs/seaweedfs/blob/master/docker/entrypoint.sh) use default values for `volumeSizeLimitMB`, `volumePreallocate`, `mdir`, `dir`, and `max` and setting environment variables won't change these values.
|
||||||
## Dcoker
|
## Dcoker
|
||||||
```shell
|
```shell
|
||||||
docker run --entrypoint weed -it -e MDIR=/tmp -e PORT=5000 -e VOLUMEPREALLOCATE=true chrislusf/seaweedfs:3.45 master
|
docker run --entrypoint weed -it -e IP_BIND=0.0.0.0 -e MDIR=/tmp -e PORT=5000 -e VOLUMEPREALLOCATE=true chrislusf/seaweedfs:3.45 master
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker Compose
|
## Docker Compose
|
||||||
|
@ -30,6 +31,7 @@ services:
|
||||||
- 9333:9333
|
- 9333:9333
|
||||||
- 19333:19333
|
- 19333:19333
|
||||||
environment:
|
environment:
|
||||||
|
IP_BIND: 0.0.0.0
|
||||||
MDIR: /data
|
MDIR: /data
|
||||||
PORT: 9333
|
PORT: 9333
|
||||||
VOLUMEPREALLOCATE: 'true'
|
VOLUMEPREALLOCATE: 'true'
|
||||||
|
|
Loading…
Reference in a new issue