Skip to content

Commit d223a5f

Browse files
committed
Fix missing space in docker compose command
1 parent c2b581a commit d223a5f

6 files changed

+26
-26
lines changed

docker-compose/docker-compose-check-services-exists.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Check if the services on a docker composeexists in docker
24+
# 1. Check if the services on a docker compose exists in docker
2525
#
2626
# You must/might inform the parameters below:
2727
# 1. The compose file full path string
@@ -41,11 +41,11 @@ docker_compose_check_service_exists()
4141
LOCAL_QTY_SERVICES=${3:-0}
4242

4343
[[ $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME == "" || $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME == null ]] && \
44-
echoerror "You must inform the docker composefull file path to the function: '${FUNCNAME[0]}'"
44+
echoerror "You must inform the docker compose full file path to the function: '${FUNCNAME[0]}'"
4545

46-
[[ "$DEBUG" == true ]] && echo "Checking if docker composeservices exists for: '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME'"
46+
[[ "$DEBUG" == true ]] && echo "Checking if docker compose services exists for: '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME'"
4747

48-
LOCAL_RESULTS=$(docker compose--file "$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME" ps --quiet | wc -l)
48+
LOCAL_RESULTS=$(docker compose --file "$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME" ps --quiet | wc -l)
4949

5050
# Check results
5151
if [[ $LOCAL_RESULTS > $LOCAL_QTY_SERVICES ]]; then

docker-compose/docker-compose-check-services-is-running.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Check if the services on a docker composefile is running
24+
# 1. Check if the services on a docker compose file is running
2525
#
2626
# You must/might inform the parameters below:
2727
# 1. The compose file full path string
@@ -41,11 +41,11 @@ docker_compose_check_service_is_running()
4141
LOCAL_QTY_SERVICES=${3:-0}
4242

4343
[[ $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME == "" || $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME == null ]] && \
44-
echoerror "You must inform the docker composefull file path to the function: '${FUNCNAME[0]}'"
44+
echoerror "You must inform the docker compose full file path to the function: '${FUNCNAME[0]}'"
4545

46-
[[ "$DEBUG" == true ]] && echo "Checking if docker composeservices are running for: '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME'"
46+
[[ "$DEBUG" == true ]] && echo "Checking if docker compose services are running for: '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME'"
4747

48-
LOCAL_RESULTS=$(docker compose--file "$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME" ps | grep "Up" | wc -l)
48+
LOCAL_RESULTS=$(docker compose --file "$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME/$LOCAL_DOCKER_COMPOSE_FILE_NAME" ps | grep "Up" | wc -l)
4949

5050
# Check results
5151
if [[ $LOCAL_RESULTS > $LOCAL_QTY_SERVICES ]]; then

docker-compose/docker-compose-replace-string.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Update specific string in docker composefile
24+
# 1. Update specific string in docker compose file
2525
#
2626
# You must/might inform the parameters below:
2727
# 1. Path where the compose file are located (/path/docker-compose.yml)
2828
# 2. String that should be REPLACED
2929
# 3. New String
30-
# 4. [optional] docker composefile name (default: docker-compose.yml)
30+
# 4. [optional] docker compose file name (default: docker-compose.yml)
3131
#
3232
#-----------------------------------------------------------------------
3333

@@ -46,6 +46,6 @@ docker_compose_replace_string()
4646
# Check if file exists
4747
[[ "$DEBUG" == true ]] && echo "Updating in file '$LOCAL_DOCKER_COMPOSE_FULL_FILE_PATH' the string from: '$LOCAL_REPLACE_STRING_FROM' to: '$LOCAL_REPLACE_STRING_TO' - [function: ${FUNCNAME[0]}]"
4848

49-
# Update the docker composefile
49+
# Update the docker compose file
5050
file_update_file $LOCAL_DOCKER_COMPOSE_FULL_FILE_PATH $LOCAL_REPLACE_STRING_FROM $LOCAL_REPLACE_STRING_TO
5151
}

docker-compose/docker-compose-start.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Start the docker composeservice
24+
# 1. Start the docker compose service
2525
#
2626
# You must/might inform the parameters below:
2727
# 1. Path where the compose file are located (/path/docker-compose.yml)
28-
# 2. [optional] (default: false) pull docker composeimages before start
29-
# 3. [optional] (default: docker-compose.yml) docker composefile name
28+
# 2. [optional] (default: false) pull docker compose images before start
29+
# 3. [optional] (default: docker-compose.yml) docker compose file name
3030
# 4. [optional] (default: .env) .env file name
3131
# 5. [optional] (default: same location in arg. 1) .env file location
3232
#
@@ -46,13 +46,13 @@ docker_compose_start()
4646

4747
[[ $LOCAL_DOCKER_COMPOSE_PATH == "" || $LOCAL_DOCKER_COMPOSE_PATH == null ]] && echoerror "You must inform the required argument(s) to the function: '${FUNCNAME[0]}'"
4848

49-
[[ "$DEBUG" == true ]] && echo "Starting docker composer service for '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME' - [function: ${FUNCNAME[0]}]"
49+
[[ "$DEBUG" == true ]] && echo "Starting docker compose service for '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME' - [function: ${FUNCNAME[0]}]"
5050

5151
# Pull if set
52-
[[ "$LOCAL_PULL_BEFORE_START" == true ]] && docker compose--env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME pull
52+
[[ "$LOCAL_PULL_BEFORE_START" == true ]] && docker compose --env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME pull
5353

5454
# Start service
55-
if ! docker compose--env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME up -d; then
55+
if ! docker compose --env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME up -d; then
5656
ERROR_DOCKER_COMPOSE_START=true
5757
fi
5858
}

docker-compose/docker-compose-stop.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Stop the docker composeservice
24+
# 1. Stop the docker compose service
2525
#
2626
# You must inform the parameters below:
2727
# 1. Path where the compose file are located (/path/docker-compose.yml)
28-
# 2. [optional] (default: docker-compose.yml) docker composefile name
28+
# 2. [optional] (default: docker-compose.yml) docker compose file name
2929
# 3. [optional] (default: .env) .env file name
3030
# 4. [optional] (default: same location in arg. 1) .env file location
3131
#
@@ -42,12 +42,12 @@ docker_compose_stop()
4242
LOCAL_DOCKER_COMPOSE_ENV_PATH=${4:-$LOCAL_DOCKER_COMPOSE_PATH}
4343
LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE="${LOCAL_DOCKER_COMPOSE_ENV_PATH%/}/$LOCAL_DOCKER_COMPOSE_ENV_FILE"
4444

45-
[[ $LOCAL_DOCKER_COMPOSE_PATH == "" ]] && [[ $LOCAL_DOCKER_COMPOSE_PATH == null ]] && echoerror "You must inform the docker composefile path to the function: '${FUNCNAME[0]}'"
45+
[[ $LOCAL_DOCKER_COMPOSE_PATH == "" ]] && [[ $LOCAL_DOCKER_COMPOSE_PATH == null ]] && echoerror "You must inform the docker compose file path to the function: '${FUNCNAME[0]}'"
4646

47-
[[ "$DEBUG" == true ]] && echo "Stopping docker composer service for '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME' - [function: ${FUNCNAME[0]}]"
47+
[[ "$DEBUG" == true ]] && echo "Stopping docker compose service for '$LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME' - [function: ${FUNCNAME[0]}]"
4848

4949
# Stop service or return error variable
50-
if ! docker compose--env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME down; then
50+
if ! docker compose --env-file $LOCAL_DOCKER_COMPOSE_ENV_FULL_FILE --file $LOCAL_DOCKER_COMPOSE_FULL_FILE_NAME down; then
5151
ERROR_DOCKER_COMPOSE_STOP=true
5252
fi
5353
}

docker-compose/docker-compose-wpcli-search-replace.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
#-----------------------------------------------------------------------
2323
# This function has one main objective:
24-
# 1. Run wp-cli search and replace function at a docker composefile
24+
# 1. Run wp-cli search and replace function at a docker compose file
2525
#
2626
# You must/might inform the parameters below:
2727
# 1. Path where the compose file are located (/path/docker-compose.yml)
2828
# 2. String that should be REPLACED in database
2929
# 3. New String
30-
# 4. [optional] docker composefile name (default: docker-compose.yml)
30+
# 4. [optional] docker compose file name (default: docker-compose.yml)
3131
#
3232
#-----------------------------------------------------------------------
3333

@@ -46,9 +46,9 @@ docker_compose_wpcli_search_replace()
4646
# Check if file exists
4747
[[ "$DEBUG" == true ]] && echo "Updating in file '$LOCAL_DOCKER_COMPOSE_FULL_FILE_PATH' the string from: '$LOCAL_REPLACE_STRING_FROM' to: '$LOCAL_REPLACE_STRING_TO' - [function: ${FUNCNAME[0]}]"
4848

49-
# Update the docker composefile
49+
# Update the docker compose file
5050
cd $(dirname $LOCAL_DOCKER_COMPOSE_FULL_FILE_PATH) > /dev/null 2>&1
51-
if ! docker composerun --rm wpcli search-replace $LOCAL_REPLACE_STRING_FROM $LOCAL_REPLACE_STRING_TO; then
51+
if ! docker compose run --rm wpcli search-replace $LOCAL_REPLACE_STRING_FROM $LOCAL_REPLACE_STRING_TO; then
5252
ERROR_DOCKER_COMPOSE_WPCLI_SEARCH_REPLACE=true
5353
fi
5454
cd - > /dev/null 2>&1

0 commit comments

Comments
 (0)