From c6f7ee8336229dda945c4d7a6190079ac4b26b57 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Tue, 20 Dec 2022 17:39:09 +0100 Subject: [PATCH] update docker/init.sh --- docker/init.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docker/init.sh b/docker/init.sh index fdb14f5..e5c103e 100755 --- a/docker/init.sh +++ b/docker/init.sh @@ -6,7 +6,9 @@ # ---------------------------------------------------------------------- # 2021-11-nn v1.0 <axel.hahn@iml.unibe.ch> # 2022-07-19 v1.1 <axel.hahn@iml.unibe.ch> support multiple dirs for setfacl -# 2022-07-19 v1.2 <www.axel-hahn.de> use docker-compose -p "$APP_NAME" +# 2022-11-16 v1.2 <www.axel-hahn.de> use docker-compose -p "$APP_NAME" +# 2022-12-18 v1.3 <www.axel-hahn.de> add -p "$APP_NAME" in other docker commands +# 2022-12-20 v1.4 <axel.hahn@unibe.ch> replace fgrep with grep -F # ====================================================================== cd $( dirname $0 ) @@ -15,7 +17,7 @@ cd $( dirname $0 ) # git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git selfgitrepo="docker-php-starterkit.git" -_version="1.2" +_version="1.4" # ---------------------------------------------------------------------- # FUNCTIONS @@ -89,7 +91,7 @@ function _removeGitdata(){ function _fix_no-db(){ local _file=$1 if [ $DB_ADD = false ]; then - typeset -i local iStart=$( cat ${_file} | fgrep -n "$CUTTER_NO_DATABASE" | cut -f 1 -d ':' )-1 + typeset -i local iStart=$( cat ${_file} | grep -Fn "$CUTTER_NO_DATABASE" | cut -f 1 -d ':' )-1 if [ $iStart -gt 0 ]; then sed -ni "1,${iStart}p" ${_file} fi @@ -189,7 +191,7 @@ function _showContainers(){ local bLong=$1 h2 CONTAINERS if [ -z "$bLong" ]; then - docker-compose ps + docker-compose -p "$APP_NAME" ps else docker ps | grep $APP_NAME fi @@ -291,17 +293,17 @@ while true; do echo " $frontendurl" else echo "ERROR: docker-compose up failed :-/" - docker-compose logs | tail + docker-compose -p "$APP_NAME" logs | tail fi echo _wait ;; s) - docker-compose stop + docker-compose -p "$APP_NAME" stop ;; r) - docker-compose rm -f + docker-compose -p "$APP_NAME" rm -f ;; c) docker ps -- GitLab