summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md16
-rw-r--r--workflow-designer-ui/docker/Dockerfile16
-rw-r--r--workflow-designer-ui/docker/startup.sh25
-rw-r--r--workflow-designer-ui/pom.xml35
4 files changed, 82 insertions, 10 deletions
diff --git a/README.md b/README.md
index a391684b..0c090314 100644
--- a/README.md
+++ b/README.md
@@ -174,17 +174,31 @@ nexus3.onap.org:10001/onap/workflow-frontend:latest`
- JAVA_OPTIONS — optionally, JVM (Java Virtual Machine) arguments.
+For SSL connectivity:
+
+- IS_HTTPS — flag to set if frontend accepts https connection from client. Default is false.
+
+- KEYSTORE_PATH
+- KEYSTORE_PASSWORD
+- KEYSTORE_TYPE
+- TRUSTSTORE_PATH
+- TRUSTSTORE_PASSWORD
+- TRUSTSTORE_TYPE
+
+If not set then Using jetty default SSL keys.
+
### Example
`docker run -d --name workflow-frontend
-e BACKEND=http://$(docker inspect workflow-backend --format={{.NetworkSettings.IPAddress}}):8080
--e JAVA_OPTIONS="-Xmx64m -Xms64m -Xss1m" -p 9088:8080 nexus3.onap.org:10001/onap/workflow-frontend:latest`
+-e JAVA_OPTIONS="-Xmx64m -Xms64m -Xss1m" -p 9088:8080 -p 8186:8443 -e IS_HTTPS=true nexus3.onap.org:10001/onap/workflow-frontend:latest`
Notice that port 8080 of the frontend container has been
[mapped]( https://docs.docker.com/config/containers/container-networking/#published-ports) to port 9088 of the host
machine. This makes the Workflow Designer Web application accessible from the outside world via the host machine's
IP address/hostname.
+To expose the https port 8443 of the container we have published in the example 8186.
### Troubleshooting
In order to check if the Workflow Designer frontend has successfully started, look at the logs of the
diff --git a/workflow-designer-ui/docker/Dockerfile b/workflow-designer-ui/docker/Dockerfile
new file mode 100644
index 00000000..83e8d5ac
--- /dev/null
+++ b/workflow-designer-ui/docker/Dockerfile
@@ -0,0 +1,16 @@
+FROM jetty:9.4.9-alpine
+
+EXPOSE 8080
+EXPOSE 8443
+
+USER root
+
+ARG ARTIFACT
+
+ADD ${ARTIFACT} ${JETTY_BASE}/webapps/
+RUN chown -R jetty:jetty ${JETTY_BASE}/webapps
+
+COPY startup.sh .
+RUN chmod 744 startup.sh
+
+ENTRYPOINT [ "./startup.sh" ] \ No newline at end of file
diff --git a/workflow-designer-ui/docker/startup.sh b/workflow-designer-ui/docker/startup.sh
new file mode 100644
index 00000000..359e6aca
--- /dev/null
+++ b/workflow-designer-ui/docker/startup.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# adding support for https
+HTTPS_ENABLED=${IS_HTTPS:-"false"}
+
+if [ "$HTTPS_ENABLED" = "true" ]
+then
+ echo "enable ssl"
+ if [ -z "$KEYSTORE_PATH" ]; then
+ java -jar "${JETTY_HOME}/start.jar" --add-to-start=https,ssl \
+ jetty.sslContext.keyStorePath=$KEYSTORE_PATH \
+ jetty.sslContext.keyStorePassword=$KEYSTORE_PASSWORD \
+ jetty.sslContext.keyStoreType=$KEYSTORE_TYPE \
+ jetty.sslContext.trustStorePath=$TRUSTSTORE_PATH \
+ jetty.sslContext.trustStorePassword=$TRUSTSTORE_PASSWORD \
+ jetty.sslContext.trustStoreType=$TRUSTSTORE_TYPE \
+ else
+ echo "Using jetty default SSL"
+ java -jar "${JETTY_HOME}/start.jar" --add-to-start=https,ssl
+ fi
+else
+ echo "no ssl required"
+fi
+
+java -DproxyTo=$BACKEND $JAVA_OPTIONS -jar $JETTY_HOME/start.jar \ No newline at end of file
diff --git a/workflow-designer-ui/pom.xml b/workflow-designer-ui/pom.xml
index 46c24536..4e55001e 100644
--- a/workflow-designer-ui/pom.xml
+++ b/workflow-designer-ui/pom.xml
@@ -147,6 +147,28 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-resources-docker</id>
+ <phase>install</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/docker</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}</directory>
+ <include>${project.artifactId}-${project.version}.war</include>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
@@ -157,15 +179,10 @@
<tags>
<tag>${project.version}</tag>
</tags>
- <from>jetty:9.4.11-alpine</from>
- <user>root</user>
- <assembly>
- <descriptorRef>artifact</descriptorRef>
- <targetDir>/var/lib/jetty/webapps</targetDir>
- </assembly>
- <entryPoint>
- java -DproxyTo=$BACKEND $JAVA_OPTIONS -jar $JETTY_HOME/start.jar
- </entryPoint>
+ <dockerFileDir>${project.basedir}/docker</dockerFileDir>
+ <args>
+ <ARTIFACT>${project.artifactId}-${project.version}.war</ARTIFACT>
+ </args>
</build>
</image>
</images>