This commit is contained in:
Nawaz Dhandala 2020-03-20 18:48:19 +01:00
parent 35bd180b80
commit 27284e826c
No known key found for this signature in database
GPG Key ID: 43C184A0DB24F9F6
8 changed files with 47 additions and 11 deletions

4
.gitignore vendored
View File

@ -31,4 +31,6 @@ cleanup.sh
nohup.out*
encrypted-credentials.tar
encrypted-credentials/
encrypted-credentials/
_README.md

View File

@ -8,7 +8,7 @@
<meta name="slack-app-id" content="ACVBMTPJQ">
<meta name="description" content="This is the login page for Fyipe Dashboard">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="./assets/img/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="./assets/img/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/img/favicons/favicon-32x32.png">
@ -42,7 +42,7 @@
<link rel="preload" href="./assets/fonts/camphor/font3.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="preload" href="./assets/fonts/camphor/font4.woff2" as="font" type="font/woff2" crossorigin="">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" type="text/javascript" defer></script>
<script src="%PUBLIC_URL%/env.js"></script>
<script src="./env.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tipsy/1.0.3/jquery.tipsy.min.js" type="text/javascript" defer></script>
<script src="https://js.stripe.com/v3/" defer></script>
<link rel="preconnect" href="https://m.stripe.com">

View File

@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000">
<meta name="slack-app-id" content="ACVBMTPJQ">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="./assets/img/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="./assets/img/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/img/favicons/favicon-32x32.png">
@ -33,7 +33,7 @@
<link rel="preload" href="./assets/fonts/camphor/font3.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="preload" href="./assets/fonts/camphor/font4.woff2" as="font" type="font/woff2" crossorigin="">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script src="%PUBLIC_URL%/env.js"></script>
<script src="./env.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tipsy/1.0.3/jquery.tipsy.min.js" type="text/javascript"></script>
<script src="https://js.stripe.com/v3/"></script>
<style type="text/css">

View File

@ -24,16 +24,16 @@ const isLocalhost = Boolean(
export function register(config) {
if ('serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
const publicUrl = new URL(window.location.origin);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// Our service worker won't work if publicUrl is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-workr.js`;
const swUrl = `/service-workr.js`;
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.

View File

@ -1,14 +1,25 @@
############----INGRESS---#####################################
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/ssl-redirect: "true"
name: {{ printf "%s-%s" .Release.Name "ingress" }}
spec:
{{- if .Values.fyipe.tls.enabled }}
tls:
- hosts:
- {{ .Values.fyipe.tls.host }}
secretName: {{ printf "%s-%s" .Release.Name "secret" }}
{{- end }}
rules:
{{- if .Values.fyipe.tls.enabled }}
- host: {{ .Values.fyipe.tls.host }}
http:
{{- else }}
- http:
{{- end }}
paths:
- path: /accounts
backend:
@ -43,6 +54,11 @@ spec:
backend:
serviceName: {{ printf "%s-%s" .Release.Name "api-docs" }}
servicePort: 80
{{- else }}
- path: /
backend:
serviceName: {{ printf "%s-%s" .Release.Name "accounts" }}
servicePort: 80
{{- end }}
---
##################################

View File

@ -0,0 +1,11 @@
{{- if .Values.fyipe.tls.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-%s" .Release.Name "secret" }}
type: Opaque
data:
tls.crt: {{ .Values.fyipe.tls.crt }}
tls.key: {{ .Values.fyipe.tls.key }}
---
{{- end }}

View File

@ -13,8 +13,14 @@ saas:
amplitude:
key: 802d95003af23aad17ed068b6cfdeb2b
###################################################################################
fyipe:
fyipe:
tls:
enabled:
crt:
key:
host:
emailEnabled: true
callEnabled: true
smsEnabled: true
@ -83,7 +89,7 @@ encryption:
image:
registry: docker.io
repository: fyipeproject
tag: latest
tag: test
pullPolicy: Always
restartPolicy: Always

View File

@ -42,5 +42,6 @@ build api-docs
build probe
build admin-dashboard
build init-script
build slack
cd $DIR