From fe57a29228ca2cde738346ad927c2f3f45f9e9ab Mon Sep 17 00:00:00 2001 From: SmsS4 <36403983+SmsS4@users.noreply.github.com> Date: Mon, 24 Apr 2023 19:48:30 +0330 Subject: [PATCH] Add example for flags with dot in their name --- Environment-Variables.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Environment-Variables.md b/Environment-Variables.md index 1c78f26..27cabb3 100644 --- a/Environment-Variables.md +++ b/Environment-Variables.md @@ -1,8 +1,9 @@ # Environment Variables You can use environment variables instead of arguments for `weed`. 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 +export IP_BIND=0.0.0.0 export PORT=5000 export MDIR=/tmp 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. ## Dcoker ```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 @@ -30,6 +31,7 @@ services: - 9333:9333 - 19333:19333 environment: + IP_BIND: 0.0.0.0 MDIR: /data PORT: 9333 VOLUMEPREALLOCATE: 'true'