Commit 9d8022c8 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Renombra variable para permitir interpolado

En lugar de omitir, la variable hasta ahora usada con el nombre
OMIT_COMPOSE_ENV_FILE_INTERPOLATION realmente se usa para permitir dicha
interpolación de variables dentro del fichero .env. Por lo tanto, se
renombra para evitar confusiones.
parent bdaa1e02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ You may define these environment variables (**bold** are mandatory):
| **DEPLOY_KEY** | - | Private key used to authenticate, paired with a public key accepted by remote host. |
| **SSH_REMOTE** | - | SSH user and hostname (DNS or IP) of remote host where you are going to deploy. |
| **STACK** | - | Name of Docker stack (*Swarm* mode) or project (*Compose* mode) used to wrap deployed services. |
| *ALLOW_COMPOSE_ENV_FILE_INTERPOLATION* | `0` | Allow passing variable values directly from `COMPOSE_ENV_FILE_NAME` file (`.env` by default), to let *Compose* interpolate variables used into values. By default, values will be single-quoted before checking config and deploying with *Compose*, to avoid getting unwanted variable resolution. Useful only for *Compose* mode. |
| *COMPOSE_ENV_FILE_NAME* | `.env` | Name of variable values definition file. |
| *COMPOSE_FILE* | `compose.yaml` | Name of service definition file. Multiple files are supported, separated by colon (`:`). |
| *DEFAULT_DEPLOY_FILES* | `*compose*.y*ml ${COMPOSE_ENV_FILE_NAME}` | Files needed for deployment. Used only if `DEPLOY_DIR_NAME` directory does not exist. |
@@ -96,7 +97,6 @@ You may define these environment variables (**bold** are mandatory):
| *FORCE_DOCKER_COMPOSE* | `0` | Use always standard (*Compose*) mode instead of Docker *Swarm*, even if it is available at deployment target host. |
| *GREP_BIN* | `grep` | Path to *grep* binary in deployment target host. |
| *OMIT_CLEAN_DEPLOY* | `0` | Leave at deployment target host all deployment resources after doing a deploy. Useful when using bind mounts or *Compose* secrets (pointing to static content in deployment resources) or you want to check sent contents. |
| *OMIT_COMPOSE_ENV_FILE_INTERPOLATION* | `0` | Allow passing variable values directly from `COMPOSE_ENV_FILE_NAME` file (`.env` by default), to let *Compose* interpolate variables used into values. By default, values will be single-quoted before checking config and deploy with *Compose*, to avoid getting unwanted variable resolution. Useful only for *Compose* mode. |
| *OMIT_STATUS_CHECK* | `0` | Bypass status check process after deploying services. Useful when you need to be fast. |
| *REGISTRY_PASS* | - | Docker registry password, corresponding to a user with read permissions. **Required** for private registry or repository. |
| *REGISTRY_URL* | - | Docker registry address, where Docker must log in to retrieve images. Useful only when using private registry or repository. Default is empty, to use Docker Hub registry. |
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ then
else
	echo -e "docker compose config${INFO_COLOR} ]${NULL_COLOR}\n"

	if [ ${OMIT_COMPOSE_ENV_FILE_INTERPOLATION} -eq 0 ]
	if [ ${ALLOW_COMPOSE_ENV_FILE_INTERPOLATION} -eq 0 ]
	then
		envConfigContent=""
		while IFS= read -r envLine
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ DEFAULT_DEPLOY_FILES="${DEFAULT_DEPLOY_FILES:-*compose*.y*ml ${COMPOSE_ENV_FILE_
FORCE_DOCKER_COMPOSE="${FORCE_DOCKER_COMPOSE:-0}"
OMIT_CLEAN_DEPLOY="${OMIT_CLEAN_DEPLOY:-0}"
SWARM_RESOLVE_IMAGE="${SWARM_RESOLVE_IMAGE:-always}"
OMIT_COMPOSE_ENV_FILE_INTERPOLATION="${OMIT_COMPOSE_ENV_FILE_INTERPOLATION:-0}"
ALLOW_COMPOSE_ENV_FILE_INTERPOLATION="${ALLOW_COMPOSE_ENV_FILE_INTERPOLATION:-0}"

OMIT_STATUS_CHECK="${OMIT_STATUS_CHECK:-0}"
STATUS_CHECK_RETRIES="${STATUS_CHECK_RETRIES:-10}"