From 993f8e7c8dfc84b6694faf50d1e9ddb4555919d7 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Thu, 6 Jul 2017 03:45:01 +0000 Subject: Reporting docker deployment improvement In the patch, I make build pages(landing page ...), when docker build, when run a container, we can set the api url(default:testresults.opnfv.org/reporting2) by -e; For example: 1. In testresults.opnfv.org: docker run -itd -p 8888:8000 -p 80:80 opnfv/reporting:tag visit: http://testresults.opnfv.org/reporting2/reporting/index.html 2. Personal use: docker run -itd -p 8888:8000 -p 80:80 -e SERVER_URL=192.168.131.2:8888 opnfv/reporting:tag visit: http://192.168.131.2:8888/reporting/index.html Change-Id: Ib838c12e785151acf9852f25eab254aedc520a1d Signed-off-by: chenjiankun --- utils/test/reporting/docker/reporting.sh | 2 ++ utils/test/reporting/docker/supervisor.conf | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'utils/test/reporting/docker') diff --git a/utils/test/reporting/docker/reporting.sh b/utils/test/reporting/docker/reporting.sh index 49f4517f7..7fe97a88e 100755 --- a/utils/test/reporting/docker/reporting.sh +++ b/utils/test/reporting/docker/reporting.sh @@ -98,3 +98,5 @@ echo "daemon off;" >> /etc/nginx/nginx.conf cp /home/opnfv/utils/test/reporting/docker/supervisor.conf /etc/supervisor/conf.d/ ln -s /usr/bin/nodejs /usr/bin/node + +cd pages && /bin/bash angular.sh diff --git a/utils/test/reporting/docker/supervisor.conf b/utils/test/reporting/docker/supervisor.conf index 5e315babe..b323dd029 100644 --- a/utils/test/reporting/docker/supervisor.conf +++ b/utils/test/reporting/docker/supervisor.conf @@ -1,22 +1,19 @@ [supervisord] nodaemon = true -[program:reporting_tornado] +[program:tornado] user = root directory = /home/opnfv/utils/test/reporting/api/api command = python server.py --port=800%(process_num)d process_name=%(program_name)s%(process_num)d numprocs=4 numprocs_start=1 -autorestart = true -[program:reporting_nginx] +[program:nginx] user = root command = service nginx restart -autorestart = true -[program:reporting_angular] +[program:configuration] user = root directory = /home/opnfv/utils/test/reporting/pages -command = bash angular.sh -autorestart = true +command = bash config.sh -- cgit 1.2.3-korg