From 4088a9bdec94c554fe23e35ac9df482c91241de5 Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Tue, 21 May 2019 15:11:49 -0300 Subject: [PATCH] Adds OSMUI_SQL_DATABASE_URI env var generation to installer Adds install of mysql deps in LWUI Dockerfile. Adds use of entrypoint script in LWUI Dockerfile Change-Id: Iab709bd534291083d4890dd33e9f3c490d11cea1 Signed-off-by: Benjamin Diaz --- docker/light-ui/Dockerfile | 2 +- installers/docker/docker-compose.yaml | 2 ++ installers/full_install_osm.sh | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/light-ui/Dockerfile b/docker/light-ui/Dockerfile index 1e54567a..29cbb743 100644 --- a/docker/light-ui/Dockerfile +++ b/docker/light-ui/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:16.04 -RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor curl software-properties-common +RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor curl software-properties-common libmysqlclient-dev mysql-client RUN npm install -g bower RUN ln -s /usr/bin/nodejs /usr/bin/node RUN echo "daemon off;" >> /etc/nginx/nginx.conf diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml index f6082626..d8866e5b 100644 --- a/installers/docker/docker-compose.yaml +++ b/installers/docker/docker-compose.yaml @@ -174,5 +174,7 @@ services: OSM_SERVER: nbi #depends_on: # - nbi + env_file: + - ./lwui.env ports: - "${OSM_UI_PORTS:-80:80}" diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index c1380d5f..3276b143 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -834,6 +834,11 @@ function generate_docker_env_files() { echo "OSMPOL_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/pol" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/pol.env fi + # LW-UI + if [ ! -f $OSM_DOCKER_WORK_DIR/lwui.env ]; then + echo "OSMUI_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/lwui" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lwui.env + fi + echo "Finished generation of docker env files" } -- 2.25.1