Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
90559f09
Commit
90559f09
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update init.sh to v1.6
parent
6ab0368d
No related branches found
No related tags found
1 merge request
!60
6611 alphabetic order in overview
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/init.sh
+34
-19
34 additions, 19 deletions
docker/init.sh
with
34 additions
and
19 deletions
docker/init.sh
+
34
−
19
View file @
90559f09
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
# 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
# 2023-03-06 v1.5 <www.axel-hahn.de> up with and without --build
# 2023-08-17 v1.6 <www.axel-hahn.de> menu selection with single key (without return)
# ======================================================================
# ======================================================================
cd
$(
dirname
$0
)
cd
$(
dirname
$0
)
...
@@ -18,7 +19,7 @@ cd $( dirname $0 )
...
@@ -18,7 +19,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.
5
"
_version
=
"1.
6
"
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# FUNCTIONS
# FUNCTIONS
...
@@ -227,8 +228,14 @@ function _showInfos(){
...
@@ -227,8 +228,14 @@ function _showInfos(){
echo
echo
}
}
# helper for menu: print an inverted key
function
_key
(){
printf
"
\e
[4;7m
${
1
}
\e
[0m"
}
# helper: wait for a return key
function
_wait
(){
function
_wait
(){
echo
-n
"... press RETURN > "
;
read
dummy
echo
-n
"... press RETURN > "
;
read
-r
}
}
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -246,22 +253,25 @@ while true; do
...
@@ -246,22 +253,25 @@ while true; do
_showContainers
_showContainers
h2 MENU
h2 MENU
echo
" g - remove git data of starterkit"
echo
"
$(
_key g
)
- remove git data of starterkit"
echo
echo
"
$(
_key i
)
- init application: set permissions"
echo
"
$(
_key t
)
- generate files from templates"
echo
"
$(
_key T
)
- remove generated files"
echo
echo
echo
" i - init application: set permissions"
echo
"
$(
_key u
)
- startup containers docker-compose ... up -d"
echo
" t - generate files from templates"
echo
"
$(
_key U
)
- startup containers docker-compose ... up -d --build"
echo
" T - remove generated files"
echo
"
$(
_key s
)
- shutdown containers docker-compose stop"
echo
"
$(
_key r
)
- remove containers docker-compose rm -f"
echo
echo
echo
" u - startup containers docker-compose ... up -d"
echo
"
$(
_key m
)
- more infos"
echo
" U - startup containers docker-compose ... up -d --build"
echo
"
$(
_key c
)
- console (bash)"
echo
" s - shutdown containers docker-compose stop"
echo
" r - remove containers docker-compose rm -f"
echo
echo
echo
" m - more infos"
echo
"
$(
_key q
)
- quit"
echo
" c - console (bash)"
echo
echo
echo
-n
" select >"
echo
-n
" select >"
read
action
read
-rn
1 action
echo
fi
fi
case
"
$action
"
in
case
"
$action
"
in
...
@@ -279,11 +289,12 @@ while true; do
...
@@ -279,11 +289,12 @@ while true; do
_removeGeneratedFiles
_removeGeneratedFiles
rm
-rf
containers
rm
-rf
containers
;;
;;
f
)
# not in the menu
_removeGeneratedFiles
# f)
_generateFiles
# _removeGeneratedFiles
_wait
# _generateFiles
;;
# _wait
# ;;
m
)
m
)
_showInfos
_showInfos
_wait
_wait
...
@@ -316,7 +327,11 @@ while true; do
...
@@ -316,7 +327,11 @@ while true; do
read
dockerid
read
dockerid
test
-z
"
$dockerid
"
||
docker
exec
-it
$dockerid
/bin/bash
test
-z
"
$dockerid
"
||
docker
exec
-it
$dockerid
/bin/bash
;;
;;
*
)
echo
"ACTION [
$action
] NOT IMPLEMENTED."
q
)
exit
0
;
;;
*
)
test
-n
"
$action
"
&&
(
echo
" ACTION FOR [
$action
] NOT IMPLEMENTED."
;
sleep
1
)
esac
esac
action
=
action
=
done
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment