diff options
author | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-10-22 22:52:51 +0800 |
---|---|---|
committer | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-10-22 22:52:51 +0800 |
commit | 22ad814adeae1dc739a6fe847b4a77c3aeb4acdc (patch) | |
tree | 4d38917e3f4b7c98263b78dc27fc7bbc7a8310f7 | |
parent | 492c8a551b6d5b745c54c2fa086eee1e02e97c62 (diff) |
Use supervisor to start qtip_server in docker.
JIRA:QTIP-99
Change-Id: I447973e17613c5b9dcbbaefef9d67a8dc01c838c
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
-rw-r--r-- | docker/Dockerfile | 10 | ||||
-rw-r--r-- | docker/supervisord.conf | 13 |
2 files changed, 22 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 05286b09..204400cc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,6 +35,7 @@ libjpeg62-dev \ zlib1g-dev \ python-tk \ curl \ +supervisor \ --no-install-recommends RUN apt-add-repository ppa:ansible/ansible -y @@ -60,4 +61,11 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng $REPOS_DIR/releng RUN pip install -r $REPOS_DIR/qtip/requirements.txt -CMD cd $REPOS_DIR/qtip && python restful_server/qtip_server.py>$HOME/qtip/logs/run.log +#Config supervisor + +RUN mkdir -p /var/log/supervisor +RUN locale-gen en_US en_US.UTF-8 +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + + +CMD ["/usr/bin/supervisord"] diff --git a/docker/supervisord.conf b/docker/supervisord.conf new file mode 100644 index 00000000..35d16c7e --- /dev/null +++ b/docker/supervisord.conf @@ -0,0 +1,13 @@ +[supervisord] +nodaemon=true + +[program:qtip_server] +command=bash -c "cd $REPOS_DIR/qtip&&python restful_server/qtip_server.py" +numprocs=1 +autostart=true +autorestart=true +user=root +environment=INSTALLER_TYPE="%(ENV_INSTALLER_TYPE)s",INSTALLER_IP="%(ENV_INSTALLER_IP)s",NODE_NAME="%(ENV_NODE_NAME)s" +stdout_logfile=/var/log/supervisor/%(program_name)s.log +stderr_logfile=/var/log/supervisor/%(program_name)s.log + |