Feature 11077. Update Dockerfile.production to use /app as WORKDIR

Change-Id: I6f7cb0e0897a65cd00997a70f7873ee813d1d67f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/Dockerfile.production b/Dockerfile.production
index 4870ebc..8087ebf 100644
--- a/Dockerfile.production
+++ b/Dockerfile.production
@@ -62,11 +62,11 @@
     && tar -zxvf helm-v${HELM_VERSION}.tar.gz \
     && mv linux-amd64/helm /usr/local/bin/helm3 \
     && rm -rf linux-amd64 helm-v${HELM_VERSION}.tar.gz
-WORKDIR /app/osm_lcm
+WORKDIR /app
 
 # Isolate dependencies in a venv
-RUN python -m venv /app/osm_lcm/.venv
-ENV PATH="/app/osm_lcm/.venv/bin:$PATH"
+RUN python -m venv /app/.venv
+ENV PATH="/app/.venv/bin:$PATH"
 ARG COMMON_GERRIT_REFSPEC=master
 
 # Install OSM dependency modules with no cache
@@ -85,7 +85,7 @@
 COPY . .
 RUN pip install --no-cache-dir .
 
-RUN find /app/osm_lcm -type d -name ".tox" -exec rm -rf {} +
+RUN find /app -type d -name ".tox" -exec rm -rf {} +
 
 
 #########################################################################################################################################################################
@@ -119,9 +119,9 @@
 ENV VIRTUAL_ENV=/app/.venv \
     PATH="/app/.venv/bin:$PATH"
 
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/.venv /app/.venv
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/osm_lcm/n2vc /app/osm_lcm/n2vc
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/scripts/ /app/scripts/
+COPY --from=build --chown=appuser:appuser /app/.venv /app/.venv
+COPY --from=build --chown=appuser:appuser /app/osm_lcm/n2vc/post-renderer-scripts/ /app/osm_lcm/n2vc/post-renderer-scripts/
+COPY --from=build --chown=appuser:appuser /app/scripts/ /app/scripts/
 
 EXPOSE 9090
 
@@ -132,7 +132,6 @@
     OSMLCM_VCA_HOST=vca \
     OSMLCM_VCA_PORT=17070 \
     OSMLCM_VCA_USER=admin \
-    OSMLCM_VCA_SECRET=secret \
     OSMLCM_VCA_CLOUD=localhost \
     OSMLCM_VCA_HELMPATH=/usr/local/bin/helm3 \
     OSMLCM_VCA_KUBECTLPATH=/usr/bin/kubectl \
diff --git a/scripts/start.sh b/scripts/start.sh
new file mode 100644
index 0000000..f35e187
--- /dev/null
+++ b/scripts/start.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+###############################################################################
+# Copyright 2021 Canonical Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#     Unless required by applicable law or agreed to in writing, software
+#     distributed under the License is distributed on an "AS IS" BASIS,
+#     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#     See the License for the specific language governing permissions and
+#     limitations under the License.
+###############################################################################
+
+if [ "$OSMLCM_VCA_HELM_CA_CERTS" ]; then
+  echo "$OSMLCM_VCA_HELM_CA_CERTS" >> /etc/ssl/certs/ca-certificates.crt
+fi
+
+python3 -m osm_lcm.lcm