mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-17 22:14:54 +00:00
@@ -322,7 +322,7 @@ There are some limitations to what characters you can use.
|
|||||||
Variables will be replaced in files with the following extensions:
|
Variables will be replaced in files with the following extensions:
|
||||||
`.yml`, `.yaml`, `.txt`, `.cfg`, `.conf`, `.properties`.
|
`.yml`, `.yaml`, `.txt`, `.cfg`, `.conf`, `.properties`.
|
||||||
|
|
||||||
Specific files can be excluded by listing their name (without path) in the variable `REPLACE_ENV_VARIABLES_EXCLUDES`.
|
Specific files can be excluded by listing their name (without path) in the variable `REPLACE_ENV_VARIABLES_EXCLUDES`. Paths can be excluded by listing them in the variable `REPLACE_ENV_VARIABLES_EXCLUDE_PATHS`.
|
||||||
|
|
||||||
Here is a full example where we want to replace values inside a `database.yml`.
|
Here is a full example where we want to replace values inside a `database.yml`.
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ if isTrue "${REPLACE_ENV_VARIABLES}"; then
|
|||||||
for f in ${REPLACE_ENV_VARIABLES_EXCLUDES}; do
|
for f in ${REPLACE_ENV_VARIABLES_EXCLUDES}; do
|
||||||
findExcludes="${findExcludes} -not -name $f"
|
findExcludes="${findExcludes} -not -name $f"
|
||||||
done
|
done
|
||||||
|
for p in ${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS}; do
|
||||||
|
findExcludes="${findExcludes} -not -path \"*$p*\""
|
||||||
|
done
|
||||||
isDebugging && echo "Using find exclusion: $findExcludes"
|
isDebugging && echo "Using find exclusion: $findExcludes"
|
||||||
|
|
||||||
while IFS='=' read -r name value ; do
|
while IFS='=' read -r name value ; do
|
||||||
|
|||||||
Reference in New Issue
Block a user