From a4930f0838f1224bdf4fa0885e858e7a865513ca Mon Sep 17 00:00:00 2001 From: startxfr Date: Sun, 29 Nov 2015 22:29:05 +0100 Subject: reshappe nodejs container --- Services/nodejs/run.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Services/nodejs/run.sh') diff --git a/Services/nodejs/run.sh b/Services/nodejs/run.sh index f10bbd2..366446c 100644 --- a/Services/nodejs/run.sh +++ b/Services/nodejs/run.sh @@ -41,6 +41,15 @@ function display_container_nodejs_header { # and start generating host keys function begin_config { echo "=> BEGIN NODEJS CONFIGURATION" + if [[ -d $TMP_APP_PATH ]]; then + echo "COPY application from $TMP_APP_PATH into $APP_PATH" + FILE_LIST=$(find $TMP_APP_PATH -maxdepth 1 -mindepth 1 -printf "%f\n") + for FILE in $FILE_LIST; do + echo -n "adding $APP_PATH/$FILE" + mv -f $TMP_APP_PATH/$FILE $APP_PATH/ + echo " DONE" + done + fi } # End configuration process just before starting daemon @@ -51,8 +60,8 @@ function end_config { # Start the nodejs executable with application entrypoint # the running shell function start_daemon { - echo "=> Starting nodejs daemon ..." - display_container_started + echo "=> Starting nodejs daemon ..." | tee -a $STARTUPLOG + display_container_started | tee -a $STARTUPLOG exec node $APP_MAIN } @@ -64,4 +73,4 @@ check_nodejs_environment | tee -a $STARTUPLOG display_container_nodejs_header | tee -a $STARTUPLOG begin_config | tee -a $STARTUPLOG end_config | tee -a $STARTUPLOG -start_daemon | tee -a $STARTUPLOG +start_daemon -- cgit v1.2.3