Standardise env vars

`WILDFLY_USER` -> `WILDFLY_USERNAME`
This commit is contained in:
Adnan Abdulhussein
2016-09-09 16:36:53 -07:00
parent 58be033fc4
commit 00fe8174ea
4 changed files with 12 additions and 12 deletions

View File

@@ -140,11 +140,11 @@ docker exec -it wildfly jboss-cli.sh --user=user --password=bitnami --connect
By default, a management user named `user` is created with the default password `bitnami`. Passing the `WILDFLY_PASSWORD` environment variable when running the image for the first time will set the password of this user to the value of `WILDFLY_PASSWORD`.
Additionally you can specify a user name for the management user using the `WILDFLY_USER` environment variable. When not specified, the `WILDFLY_PASSWORD` configuration is applied on the default user (`user`).
Additionally you can specify a user name for the management user using the `WILDFLY_USERNAME` environment variable. When not specified, the `WILDFLY_PASSWORD` configuration is applied on the default user (`user`).
```bash
docker run --name wildfly \
-e WILDFLY_USER=my_user \
-e WILDFLY_USERNAME=my_user \
-e WILDFLY_PASSWORD=my_password \
bitnami/wildfly:latest
```
@@ -155,7 +155,7 @@ or using Docker Compose:
wildfly:
image: bitnami/wildfly:latest
environment:
- WILDFLY_USER=my_user
- WILDFLY_USERNAME=my_user
- WILDFLY_PASSWORD=my_password
```

View File

@@ -13,7 +13,7 @@ function initialize {
}
# Set default values
export WILDFLY_USER=${WILDFLY_USER:-user}
export WILDFLY_USERNAME=${WILDFLY_USERNAME:-user}
export WILDFLY_PASSWORD=${WILDFLY_PASSWORD:-bitnami}
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then

View File

@@ -1,4 +1,4 @@
{
"username": "{{$global.env.WILDFLY_USER}}",
"username": "{{$global.env.WILDFLY_USERNAME}}",
"password": "{{$global.env.WILDFLY_PASSWORD}}"
}

View File

@@ -2,7 +2,7 @@
WILDFLY_DEFAULT_USER=user
WILDFLY_DEFAULT_PASSWORD=bitnami
WILDFLY_USER=test_user
WILDFLY_USERNAME=test_user
WILDFLY_PASSWORD=test_password
# source the helper script
@@ -66,10 +66,10 @@ cleanup_environment
@test "Can create custom user with manager role" {
container_create default -d \
-e WILDFLY_USER=$WILDFLY_USER \
-e WILDFLY_USERNAME=$WILDFLY_USERNAME \
-e WILDFLY_PASSWORD=$WILDFLY_PASSWORD
run curl_client default -i --digest http://$WILDFLY_USER:$WILDFLY_PASSWORD@$APP_NAME:9990/management
run curl_client default -i --digest http://$WILDFLY_USERNAME:$WILDFLY_PASSWORD@$APP_NAME:9990/management
[[ "$output" =~ '200 OK' ]]
}
@@ -91,12 +91,12 @@ cleanup_environment
@test "Password and settings are preserved after restart" {
container_create default -d \
-e WILDFLY_USER=$WILDFLY_USER \
-e WILDFLY_USERNAME=$WILDFLY_USERNAME \
-e WILDFLY_PASSWORD=$WILDFLY_PASSWORD
container_restart default
run curl_client default -i --digest http://$WILDFLY_USER:$WILDFLY_PASSWORD@$APP_NAME:9990/management
run curl_client default -i --digest http://$WILDFLY_USERNAME:$WILDFLY_PASSWORD@$APP_NAME:9990/management
[[ "$output" =~ '200 OK' ]]
}
@@ -109,13 +109,13 @@ cleanup_environment
@test "If host mounted, password and settings are preserved after deletion" {
container_create_with_host_volumes default -d \
-e WILDFLY_USER=$WILDFLY_USER \
-e WILDFLY_USERNAME=$WILDFLY_USERNAME \
-e WILDFLY_PASSWORD=$WILDFLY_PASSWORD
container_remove default
container_create_with_host_volumes default -d
run curl_client default -i --digest http://$WILDFLY_USER:$WILDFLY_PASSWORD@$APP_NAME:9990/management
run curl_client default -i --digest http://$WILDFLY_USERNAME:$WILDFLY_PASSWORD@$APP_NAME:9990/management
[[ "$output" =~ '200 OK' ]]
}