summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Donley <christopher.donley@huawei.com>2018-02-12 17:25:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-12 17:25:07 +0000
commita8b527ef3896aad5966c5e12485055929e4f6420 (patch)
treea30feca198f138e07de476c55156cc2d35573248
parenta52976deebff6ff5db86a9c4056af4dde507477a (diff)
parentad6c30a5bb8f9be36392d67a383b5ce274fd5d97 (diff)
Merge "Fixing nginx provisioning issues for https"
-rw-r--r--vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile13
-rwxr-xr-x[-rw-r--r--]vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh6
-rw-r--r--vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf2
3 files changed, 12 insertions, 9 deletions
diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
index 86ab5283..209cfea1 100644
--- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
+++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
@@ -19,16 +19,15 @@ ENV JAVA_HOME /usr/lib/jvm/jre
WORKDIR /service
# 20-mysq.txt
-RUN yum install epel-release
-RUN yum install nginx && \
+RUN yum -y install epel-release
+RUN yum -y install nginx && \
mkdir -p /etc/nginx/ssl
COPY nginx.conf /etc/nginx/nginx.conf
COPY certgen.sh .
-CMD chmod +x ./certgen.sh && \
- ./certgen.sh
-COPY example.key example.cert /etc/nginx/ssl/
-#CMD service nginx start
-
+CMD chmod +x ./certgen.sh
+RUN ./certgen.sh
+# && systemctl start nginx
+
# Set up mysql
RUN wget -q http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm && rm -f mysql-community-release-el7-5.noarch.rpm
RUN yum -y update
diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh
index 1108c719..796d5777 100644..100755
--- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh
+++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/certgen.sh
@@ -1,2 +1,6 @@
-#/bin/sh
+#!/bin/sh
openssl req -nodes -newkey rsa:2048 -keyout example.key -out example.csr -subj "/C=IN/ST=Bangalore/L=Bangalore/O=Global Security/OU=ONAP/CN=example.com"
+openssl x509 -req -in example.csr -signkey example.key -out cert.crt
+cp -p cert.crt /etc/nginx/ssl/
+systemctl enable nginx
+
diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf
index 34c4c367..e55f6a8a 100644
--- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf
+++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/nginx.conf
@@ -1,6 +1,6 @@
daemon off;
-pid /run/nginx.pid
+#pid /run/nginx.pid;
events {
worker_connections 500;