Skip to content

Commit

Permalink
entrypoint.sh host param fixed #210
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaltamura committed Jun 21, 2021
1 parent 6b42feb commit 733dedb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
3 changes: 1 addition & 2 deletions docker/iva-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ COPY ./build/ /usr/local/apache2/htdocs/iva/

EXPOSE 80

CMD ["httpd-foreground"]
ENTRYPOINT ["entrypoint.sh"]
ENTRYPOINT ["entrypoint.sh", "httpd-foreground"]
27 changes: 16 additions & 11 deletions docker/iva-app/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
#!/bin/bash

echo "total args:" $#
echo "first:" $1
echo "second:" $2
#echo "total args:" $#
#echo "first:" $1
#echo "second:" $2
#sed -i 's/host:".*"/host: "val" /g' /usr/local/apache2/htdocs/iva/conf/conf.js

# launch command (httpd-foreground)
cmd=$1
shift

while [[ $# -gt 0 ]] ;do
case $1 in
for i in "${@}"; do
case $i in
--host=*)
echo host ${1##--host=}
echo "opencga.host = ${1##--host=};" >> /usr/local/apache2/htdocs/iva/conf/conf.js
# exit
echo host ${i##--host=}
echo "opencga.host = ${i##--host=};" >> /usr/local/apache2/htdocs/iva/conf/config.js
shift 2
;;
-*|--*)
echo "Fatal error. Unknown option $i. "
exit
;;
esac
shift
done

echo CMD"$@"
exec "$@"
exec "$cmd"

0 comments on commit 733dedb

Please sign in to comment.