Skip to content

Commit

Permalink
Rename docker_file_env to file_env
Browse files Browse the repository at this point in the history
This function is not meant to be part of the public set
  • Loading branch information
ltangvald authored and yosifkit committed Sep 18, 2019
1 parent ef9caa9 commit 2fcb086
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .template.Debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ for arg; do
esac
done

# usage: docker_file_env VAR [DEFAULT]
# ie: docker_file_env 'XYZ_DB_PASSWORD' 'example'
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
docker_file_env() {
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
Expand Down Expand Up @@ -158,11 +158,11 @@ docker_init_env() {
PASSFILE="$(mktemp ${TMPDIR}/XXXXXXXXXX)"

# Initialize values that might be stored in a file
docker_file_env 'MYSQL_ROOT_HOST' '%'
docker_file_env 'MYSQL_DATABASE'
docker_file_env 'MYSQL_USER'
docker_file_env 'MYSQL_PASSWORD'
docker_file_env 'MYSQL_ROOT_PASSWORD'
file_env 'MYSQL_ROOT_HOST' '%'
file_env 'MYSQL_DATABASE'
file_env 'MYSQL_USER'
file_env 'MYSQL_PASSWORD'
file_env 'MYSQL_ROOT_PASSWORD'
}

# Define the client command that's used in various places
Expand Down

0 comments on commit 2fcb086

Please sign in to comment.