diff --git a/.buildpacks b/.buildpacks
index 13b8dbf8d2..1a1690f082 100644
--- a/.buildpacks
+++ b/.buildpacks
@@ -1,3 +1,2 @@
https://github.com/heroku/heroku-buildpack-nodejs.git#v183
-https://github.com/mars/create-react-app-inner-buildpack.git#v9.0.0
-https://github.com/heroku/heroku-buildpack-static.git#v5
\ No newline at end of file
+https://github.com/heroku/heroku-buildpack-nginx.git
\ No newline at end of file
diff --git a/.github/workflows/cypress-testing.yml b/.github/workflows/cypress-testing.yml
index 4b6e1ac15d..a389d87308 100644
--- a/.github/workflows/cypress-testing.yml
+++ b/.github/workflows/cypress-testing.yml
@@ -28,18 +28,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# frontend setup
- - name: Setup frontend
+ - name: Checkout frontend
uses: actions/checkout@v3
- name: Use latest Node.js
uses: actions/setup-node@v3
- - name: Setup elixir
- uses: erlef/setup-beam@v1
- with:
- elixir-version: ${{ matrix.elixir }}
- otp-version: ${{ matrix.otp }}
-
- name: Setup frontend
run: |
echo copy env file.
@@ -54,6 +48,12 @@ jobs:
yarn setup
echo done.
+ - name: Setup elixir
+ uses: erlef/setup-beam@v1
+ with:
+ elixir-version: ${{ matrix.elixir }}
+ otp-version: ${{ matrix.otp }}
+
# backend setup
- name: Setup backend
run: |
@@ -94,13 +94,9 @@ jobs:
run: |
echo clone cypress repo
git clone https://github.com/glific/cypress-testing.git
- echo done. go to dir.
cd cypress-testing
- cd ..
- cp -r cypress-testing/cypress cypress
- yarn add cypress@13.6.2
- echo Create cypress.config.ts from example
- cp cypress-testing/cypress.config.ts.example cypress.config.ts
+ cp cypress.config.ts.example cypress.config.ts
+ yarn
# Run frontend
- name: Run glific frontend
@@ -120,5 +116,6 @@ jobs:
# Run cypress
- name: Cypress run
+ working-directory: cypress-testing
run: |
yarn run cypress run --record --key ${{ secrets.CYPRESS_DASHBOARD_KEY }}
diff --git a/.github/workflows/staging-testing.yml b/.github/workflows/staging-testing.yml
new file mode 100644
index 0000000000..4ca156927d
--- /dev/null
+++ b/.github/workflows/staging-testing.yml
@@ -0,0 +1,35 @@
+name: Staging Integration Testing
+
+on:
+ pull_request:
+ branches: [rvignesh/fix-nginx-conf]
+
+jobs:
+ cypress:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout frontend
+ uses: actions/checkout@v3
+
+ - name: Use latest Node.js
+ uses: actions/setup-node@v3
+
+ - name: Install dependencies
+ run: yarn setup
+
+ - name: Setup Cypress
+ run: |
+ git clone https://github.com/glific/cypress-testing.git
+ cd cypress-testing
+ git checkout test_staging
+ cd ..
+ cp -r cypress-testing/cypress cypress
+ yarn add cypress@13.6.2
+ cp cypress-testing/cypress.config.ts.example cypress.config.ts
+
+ - name: Cypress run
+ env:
+ CYPRESS_BASE_URL: https://staging.glific.com
+ CYPRESS_BACKEND_URL: https://api.staging.glific.com/api
+ run: |
+ yarn run cypress run --record --key ${{ secrets.CYPRESS_DASHBOARD_KEY }}
\ No newline at end of file
diff --git a/Procfile b/Procfile
new file mode 100644
index 0000000000..d545c9d818
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: bin/start-nginx-static
\ No newline at end of file
diff --git a/config/nginx.conf.erb b/config/nginx.conf.erb
new file mode 100644
index 0000000000..4043bd1764
--- /dev/null
+++ b/config/nginx.conf.erb
@@ -0,0 +1,41 @@
+daemon off;
+
+worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
+
+pid /app/nginx.pid;
+error_log stderr error;
+
+events {
+ use epoll;
+ accept_mutex on;
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ gzip on;
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
+
+ log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
+ access_log /dev/stdout l2met;
+
+ server {
+ listen <%= ENV['PORT'] %>;
+ root /app/build;
+ index index.html;
+
+ add_header X-Content-Type-Options "nosniff" always;
+ add_header X-XSS-Protection "1; mode=block" always;
+ add_header X-Frame-Options "deny" always;
+ add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always;
+ add_header Content-Security-Policy "default-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; script-src-elem 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com https://js.stripe.com; frame-src 'self' https://js.stripe.com https://www.canva.com https://www.google.com https://www.gstatic.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src *;" always;
+
+ if ($http_x_forwarded_proto != "https") {
+ return 301 https://$host$request_uri;
+ }
+
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+ }
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index d6e8f260d5..bbb2f137d1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "glific-frontend",
- "version": "6.9.0",
+ "version": "6.9.1",
"private": true,
"type": "module",
"license": {
diff --git a/src/containers/Auth/Auth.tsx b/src/containers/Auth/Auth.tsx
index d170fe8c8e..4bc01fe8fa 100644
--- a/src/containers/Auth/Auth.tsx
+++ b/src/containers/Auth/Auth.tsx
@@ -15,8 +15,6 @@ import setLogs from 'config/logs';
import { checkOrgStatus } from 'services/AuthService';
import { TERMS_OF_USE_LINK } from 'common/constants';
-import { Promotion } from './Promotion/Promotion';
-
export interface AuthProps {
pageTitle: string;
buttonText: string;
@@ -302,8 +300,6 @@ export const Auth = ({
>
) : null}
-
- {mode === 'login' &&