diff options
author | Bin Yang <bin.yang@windriver.com> | 2017-09-08 15:50:05 +0800 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2017-09-08 15:50:05 +0800 |
commit | 9be6dfbd7c81d017865a5eccacdcedb184ef6e50 (patch) | |
tree | d4f99dd0013150fbaf40fbd91d882da7ecabdef1 /newton/run.sh | |
parent | 08fd690840bea327695aca0e816345c5ce7e3cbf (diff) |
Add docker build file
add docker build file to generate container image
Change-Id: I08e289dea8caf01b9690d80c2c21355d0f121a6b
Issue-Id: MULTICLOUD-58
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton/run.sh')
-rwxr-xr-x | newton/run.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/newton/run.sh b/newton/run.sh index 8b8b0890..763f72d7 100755 --- a/newton/run.sh +++ b/newton/run.sh @@ -10,4 +10,22 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -nohup python manage.py runserver 127.0.0.1:9003 > /dev/null & +#!/bin/bash + +sed -i "s/MSB_SERVICE_ADDR =.*/MSB_SERVICE_ADDR = \"${MSB_ADDR}\"/g" newton/pub/config/config.py +sed -i "s/MSB_SERVICE_PORT =.*/MSB_SERVICE_PORT = \"${MSB_PORT}\"/g" newton/pub/config/config.py +sed -i "s/AAI_ADDR =.*/AAI_ADDR = \"${AAI_ADDR}\"/g" newton/pub/config/config.py +sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" newton/pub/config/config.py +sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" newton/pub/config/config.py +sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" newton/pub/config/config.py +sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" newton/pub/config/config.py + +memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid + +nohup python manage.py runserver 0.0.0.0:9003 2>&1 & + +while [ ! -f logs/runtime_newton.log ]; do + sleep 1 +done + +tail -F logs/runtime_newton.log |