FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
85a3f9f4
Commit
85a3f9f4
authored
1 year ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
modifying docker launch script to pass through optional args from command line
parent
cf14a8fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configs/docker/run/runDockerEWS.sh
+24
-13
24 additions, 13 deletions
configs/docker/run/runDockerEWS.sh
with
24 additions
and
13 deletions
configs/docker/run/runDockerEWS.sh
+
24
−
13
View file @
85a3f9f4
#!/bin/bash
set
-e
upload
=
''
islive
=
'--islive'
clearup
=
'--clearup'
component
=
'not_set'
config
=
'/storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json'
# default
rundate
=
$(
date
'+%Y%m%d'
)
# default today
optionalArgs
=
""
SHORT
=
p:,c:,s:,h
LONG
=
component:,config:,rundate::,help
OPTS
=
$(
getopt
-a
-n
weather
--options
$SHORT
--longoptions
$LONG
--
"
$@
"
)
SHORT
=
p:c:s:h
LONG
=
component:,config:,rundate:,noupload::,islive::,clearup::,help
OPTS
=
$(
getopt
-a
--options
$SHORT
--longoptions
$LONG
--
"
$@
"
)
echo
$OPTS
eval set
--
"
$OPTS
"
while
:
...
...
@@ -28,6 +28,18 @@ do
rundate
=
"
$2
"
shift
2
;;
--noupload
)
optionalArgs
=
"
$optionalArgs
--noupload"
shift
2
;
;;
--islive
)
optionalArgs
=
"
$optionalArgs
--islive"
shift
2
;
;;
--clearup
)
optionalArgs
=
"
$optionalArgs
--clearup"
shift
2
;
;;
-h
|
--help
)
"This is a launch script, example usage: runDockerEWS.sh -p Deposition -c -c /<path>/config_EastAfrica_fc_live.json -s 20220808"
exit
2
...
...
@@ -45,17 +57,16 @@ done
function
run_coordinator
()
{
printf
"component: %s
\n
config: %s
\n
rundate: %s
\n
upload: %s
\n
"
$component
$config
$rundate
$upload
;
printf
"component: %s
\n
config: %s
\n
rundate: %s
\n
"
"
$component
"
"
$config
"
"
$rundate
"
printf
"optional args:
\n
%s
\n
"
"
$optionalArgs
"
docker container
ls
;
docker
exec
\
ews_runner
\
/storage/app/EWS_prod/code/coordinator/scripts/run_Processor.sh
\
-p
$component
\
-c
$config
\
-s
$rundate
\
$upload
\
$islive
\
$clearup
-p
"
$component
"
\
-c
"
$config
"
\
-s
"
$rundate
"
\
"
$optionalArgs
"
}
run_coordinator
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