Skip to content

Commit

Permalink
#1612 Working TLS on nginx, resources not included in code
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Olosutean committed Jan 18, 2021
1 parent 86c3e00 commit 6dec360
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 94 deletions.
1 change: 1 addition & 0 deletions menas-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LABEL \
name="Menas Web"

ADD start_menas_web.sh /docker-entrypoint.d/start_menas_web.sh
COPY nginx.conf nginx.conf
RUN chmod +x /docker-entrypoint.d/start_menas_web.sh && rm -rf /usr/share/nginx/html/*

COPY ./ui /usr/share/nginx/html/
14 changes: 14 additions & 0 deletions menas-web/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
events {}

http {
include mime.types;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
server {
listen 443 ssl http2;
root /usr/share/nginx/html;
server_name ${DNS_NAME};
ssl_certificate /etc/ssl/certificate.pem;
ssl_certificate_key /etc/ssl/private.pem;
}
}
7 changes: 7 additions & 0 deletions menas-web/start_menas_web.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/sh

if [ -n "${PRIVATE_KEY}" ] && [ -n "${CERTIFICATE}" ]; then
envsubst < ./nginx.conf > /etc/nginx/nginx.conf
echo "${PRIVATE_KEY}" >> /etc/ssl/private.pem
echo "${CERTIFICATE}" >> /etc/ssl/certificate.pem
echo "${CA_CHAIN}" >> /etc/ssl/cachain.pem
fi

envsubst < /usr/share/nginx/html/package.json > /usr/share/nginx/html/package-new.json
rm /usr/share/nginx/html/package.json
mv /usr/share/nginx/html/package-new.json /usr/share/nginx/html/package.json
16 changes: 3 additions & 13 deletions menas-web/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,12 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="node_modules/@openui5/sap.ui.core/src/sap-ui-core.js" id="sap-ui-bootstrap"
<script src="resources/sap-ui-core.js" id="sap-ui-bootstrap"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async"
data-sap-ui-libs="sap.m,sap.ui.table,sap.ui.layout,sap.tnt"
data-sap-ui-bindingSyntax="complex"
data-sap-ui-resourceroots='{
"sap.m": "../node_modules/@openui5/sap.m/src/sap/m",
"sap.ui": "../node_modules/@openui5/sap.ui.core/src/sap/ui",
"sap.tnt": "../node_modules/@openui5/sap.tnt/src/sap/tnt",
"sap.ui.table": "../node_modules/@openui5/sap.ui.table/src/sap/ui/table",
"sap.ui.layout": "../node_modules/@openui5/sap.ui.layout/src/sap/ui/layout",
"sap.ui.unified": "../node_modules/@openui5/sap.ui.unified/src/sap/ui/unified"
}'
data-sap-ui-theme='sap_belize'
data-sap-ui-theme-roots='{
"sap_belize": "theme"
}'></script>
data-sap-ui-theme='sap_belize'></script>

<script src="node_modules/moment/min/moment.min.js"></script>
<script src="node_modules/lodash/lodash.js"></script>
Expand Down
6 changes: 0 additions & 6 deletions menas-web/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
"lineageReadApiUrl": "${SPLINE_URL}"
},
"dependencies": {
"@openui5/sap.m": "^1.67.1",
"@openui5/sap.tnt": "1.67.1",
"@openui5/sap.ui.core": "^1.67.1",
"@openui5/sap.ui.layout": "1.67.1",
"@openui5/sap.ui.table": "1.67.1",
"@openui5/sap.ui.unified": "1.67.1",
"chart.js": "^2.7.3",
"cronstrue": "^1.106.0",
"jquery": "^3.5.1",
Expand Down
12 changes: 0 additions & 12 deletions menas-web/ui/theme/sap/m/themes/sap_belize/library.css

This file was deleted.

12 changes: 0 additions & 12 deletions menas-web/ui/theme/sap/tnt/themes/sap_belize/library.css

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

12 changes: 0 additions & 12 deletions menas-web/ui/theme/sap/ui/core/themes/sap_belize/library.css

This file was deleted.

12 changes: 0 additions & 12 deletions menas-web/ui/theme/sap/ui/layout/themes/sap_belize/library.css

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions menas-web/ui/theme/sap/ui/table/themes/sap_belize/library.css

This file was deleted.

Loading

0 comments on commit 6dec360

Please sign in to comment.