Skip to content
Snippets Groups Projects
Commit 698d5fc5 authored by hahn's avatar hahn
Browse files

update docker init script

parent 19a1494f
No related branches found
No related tags found
1 merge request!426295 commits with ampersand
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# 2022-11-16 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-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 # 2022-12-20 v1.4 <axel.hahn@unibe.ch> replace fgrep with grep -F
# 2023-03-06 v1.5 <www.axel-hahn.de> up with and without --build
# ====================================================================== # ======================================================================
cd $( dirname $0 ) cd $( dirname $0 )
...@@ -17,7 +18,7 @@ cd $( dirname $0 ) ...@@ -17,7 +18,7 @@ cd $( dirname $0 )
# git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git # git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git
selfgitrepo="docker-php-starterkit.git" selfgitrepo="docker-php-starterkit.git"
_version="1.4" _version="1.5"
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# FUNCTIONS # FUNCTIONS
...@@ -251,7 +252,8 @@ while true; do ...@@ -251,7 +252,8 @@ while true; do
echo " t - generate files from templates" echo " t - generate files from templates"
echo " T - remove generated files" echo " T - remove generated files"
echo echo
echo " u - startup containers docker-compose up -d" echo " u - startup containers docker-compose ... up -d"
echo " U - startup containers docker-compose ... up -d --build"
echo " s - shutdown containers docker-compose stop" echo " s - shutdown containers docker-compose stop"
echo " r - remove containers docker-compose rm -f" echo " r - remove containers docker-compose rm -f"
echo echo
...@@ -286,9 +288,12 @@ while true; do ...@@ -286,9 +288,12 @@ while true; do
_showInfos _showInfos
_wait _wait
;; ;;
u) u|U)
if docker-compose -p "$APP_NAME" --verbose up -d --remove-orphans --build; then dockerUp="docker-compose -p "$APP_NAME" --verbose up -d --remove-orphans"
# test ! -z "${APP_ONSTARTUP}" && sleep 2 && docker exec -it appmonitor-server /bin/bash -c "${APP_ONSTARTUP}" if [ "$action" = "U" ]; then
dockerUp+=" --build"
fi
if $dockerUp; then
echo "In a web browser:" echo "In a web browser:"
echo " $frontendurl" echo " $frontendurl"
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment