forked from LaconicNetwork/kompose
docs: add COMPOSE_FILE env variable to user-guide.md
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
parent
a91b57ef2e
commit
867adcf83a
@ -66,6 +66,11 @@ redis-master-deployment.yaml
|
||||
|
||||
When multiple docker-compose files are provided the configuration is merged. Any configuration that is common will be over ridden by subsequent file.
|
||||
|
||||
You can provide your docker-compose files via environment variables as following:
|
||||
```sh
|
||||
$ COMPOSE_FILE="docker-compose.yaml alternative-docker-compose.yaml" kompose convert
|
||||
```
|
||||
|
||||
### OpenShift
|
||||
|
||||
```sh
|
||||
|
||||
@ -311,6 +311,7 @@ cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/no-profile-warning/docker-com
|
||||
convert::expect_warning "$cmd" "No service selected. The profile specified in services of your compose yaml may not exist." || exit 1
|
||||
|
||||
# Test COMPOSE_FILE env variable is honored
|
||||
k8s_cmd="COMPOSE_FILE=\"$KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/docker-compose.yaml $KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/alternative-docker-compose.yaml\" kompose convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/fixtures/compose-file-env-variable/output-k8s.yaml"
|
||||
export COMPOSE_FILE="$KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/docker-compose.yaml $KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/alternative-docker-compose.yaml"
|
||||
k8s_cmd="kompose convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/output-k8s.yaml"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user