diff --git a/.env.example b/.env.example
new file mode 100644
index 000000000000..63e5526b5bc8
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,50 @@
+# Rename this to .env
+# Note: Please donot include quotes (double or single) in the values
+
+# Sentry
+APPSMITH_SENTRY_DSN=
+
+# Hotjar
+APPSMITH_HOTJAR_HJID=
+APPSMITH_HOTJAR_HJSV=
+
+# Google OAuth
+APPSMITH_OAUTH2_GOOGLE_CLIENT_ID=
+APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET=
+
+# Github OAuth
+APPSMITH_OAUTH2_GITHUB_CLIENT_ID=
+APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET=
+
+# Segment
+APPSMITH_SEGMENT_KEY=
+
+# RapidAPI
+APPSMITH_RAPID_API_KEY_VALUE=
+APPSMITH_MARKETPLACE_URL=
+
+# Optimizely
+APPSMITH_OPTIMIZELY_KEY=
+
+# Algolia Search (Docs)
+APPSMITH_ALGOLIA_API_ID=
+APPSMITH_ALGOLIA_API_KEY=
+APPSMITH_ALGOLIA_SEARCH_INDEX_NAME=
+
+#Client log level (debug | error)
+APPSMITH_CLIENT_LOG_LEVEL=
+
+# GOOGLE client API KEY
+APPSMITH_GOOGLE_MAPS_API_KEY=
+
+# Email server
+APPSMITH_MAIL_ENABLED=
+APPSMITH_MAIL_HOST=
+APPSMITH_MAIL_PORT=
+APPSMITH_MAIL_USERNAME=
+APPSMITH_MAIL_PASSWORD=
+
+# Email server feature toggles
+# true | false values
+APPSMITH_MAIL_SMTP_AUTH=
+APPSMITH_MAIL_SMTP_TLS_ENABLED=
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0328ccfd0574..0cc1e4b6c531 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
.DS_Store
.idea
*.iml
-
+.env
diff --git a/app/client/.gitignore b/app/client/.gitignore
index 0716e41182ed..9336c8d51283 100755
--- a/app/client/.gitignore
+++ b/app/client/.gitignore
@@ -33,3 +33,5 @@ cypress/screenshots
results/
/docker/*.pem
+/docker/nginx.conf
+
diff --git a/app/client/Dockerfile b/app/client/Dockerfile
index 73bf2c448096..d758b762ce48 100644
--- a/app/client/Dockerfile
+++ b/app/client/Dockerfile
@@ -1,7 +1,8 @@
FROM nginx:1.17.9-alpine
COPY ./build /var/www/appsmith
-RUN ls -al /var/www/appsmith
EXPOSE 80
-CMD ["nginx", "-g", "daemon off;"]
+COPY ./docker/templates/nginx-linux.conf.template /nginx.conf.template
+COPY ./docker/start-nginx.sh /start-nginx.sh
+CMD ["/start-nginx.sh"]
diff --git a/app/client/docker/nginx-linux.conf b/app/client/docker/nginx-linux.conf
deleted file mode 100644
index 9a6cbbab799d..000000000000
--- a/app/client/docker/nginx-linux.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#### TODO: Please change the backend endpoint from release-api.appsmith.com --> https://release-api.appsmith.com when merged into release
-server {
- listen 80;
- server_name dev.appsmith.com;
- client_max_body_size 10m;
-
- gzip on;
- gzip_proxied any;
-
- proxy_ssl_server_name on;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- location / {
- proxy_pass http://localhost:3000;
- }
-
- location /f {
- proxy_pass https://cdn.optimizely.com/;
- }
-
- location /api {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /oauth2 {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /login {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
-}
-
-server {
- listen 443 ssl http2;
- server_name dev.appsmith.com;
-
- ssl_certificate /etc/certificate/dev.appsmith.com.pem;
- ssl_certificate_key /etc/certificate/dev.appsmith.com-key.pem;
-
- # include /etc/letsencrypt/options-ssl-nginx.conf;
- # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- gzip on;
-
- proxy_ssl_server_name on;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- location / {
- proxy_pass http://localhost:3000;
- }
-
- location /f {
- proxy_pass https://cdn.optimizely.com/;
- }
-
- location /api {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /oauth2 {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /login {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-}
-
diff --git a/app/client/docker/nginx-mac.conf b/app/client/docker/nginx-mac.conf
deleted file mode 100644
index f9d3f49378a7..000000000000
--- a/app/client/docker/nginx-mac.conf
+++ /dev/null
@@ -1,87 +0,0 @@
-#### TODO: Please change the backend endpoint from release-api.appsmith.com --> https://release-api.appsmith.com when merged into release
-server {
- listen 80;
- server_name dev.appsmith.com;
- client_max_body_size 10m;
-
- gzip on;
- gzip_proxied any;
-
- proxy_ssl_server_name on;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
-
- location / {
- proxy_pass http://host.docker.internal:3000;
- }
-
- location /f {
- proxy_pass https://cdn.optimizely.com/;
- }
-
- location /api {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /oauth2 {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /login {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- proxy_pass https://release-api.appsmith.com;
- }
-}
-
-server {
- listen 443 ssl http2;
- server_name dev.appsmith.com;
-
- ssl_certificate /etc/certificate/dev.appsmith.com.pem;
- ssl_certificate_key /etc/certificate/dev.appsmith.com-key.pem;
-
- # include /etc/letsencrypt/options-ssl-nginx.conf;
- # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- gzip on;
-
- proxy_ssl_server_name on;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
-
- location / {
- proxy_pass http://host.docker.internal:3000;
- }
-
- location /f {
- proxy_pass https://cdn.optimizely.com/;
- }
-
- location /api {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /oauth2 {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- proxy_pass https://release-api.appsmith.com;
- }
-
- location /login {
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
-
- proxy_pass https://release-api.appsmith.com;
- }
-}
diff --git a/app/client/docker/start-nginx.sh b/app/client/docker/start-nginx.sh
new file mode 100755
index 000000000000..e4b1192492a6
--- /dev/null
+++ b/app/client/docker/start-nginx.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -ue
+cat /nginx.conf.template | envsubst "$(printf '$%s,' $(env | grep -Eo '^APPSMITH_[A-Z0-9_]+'))" | sed -e 's|\${\(APPSMITH_[A-Z0-9_]*\)}||g' | tee /etc/nginx/conf.d/app.conf
+exec nginx -g 'daemon off;'
diff --git a/app/client/docker/templates/nginx-linux.conf.template b/app/client/docker/templates/nginx-linux.conf.template
new file mode 100644
index 000000000000..9d1583fc6278
--- /dev/null
+++ b/app/client/docker/templates/nginx-linux.conf.template
@@ -0,0 +1,121 @@
+server {
+ listen 80;
+ server_name dev.appsmith.com;
+ client_max_body_size 10m;
+
+ gzip on;
+ gzip_proxied any;
+
+ proxy_ssl_server_name on;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header Accept-Encoding "";
+
+
+ sub_filter_once off;
+ location / {
+ proxy_pass http://localhost:3000;
+ sub_filter __APPSMITH_SENTRY_DSN__ '${APPSMITH_SENTRY_DSN}';
+ sub_filter __APPSMITH_APPSMITH_HOTJAR_HJID__ '${APPSMITH_HOTJAR_HJID}';
+ sub_filter __APPSMITH_HOTJAR_HJSV__ '${APPSMITH_HOTJAR_HJSV}';
+ sub_filter __APPSMITH_OAUTH2_GOOGLE_CLIENT_ID__ '${APPSMITH_OAUTH2_GOOGLE_CLIENT_ID}';
+ sub_filter __APPSMITH_OAUTH2_GITHUB_CLIENT_ID__ '${APPSMITH_OAUTH2_GITHUB_CLIENT_ID}';
+ sub_filter __APPSMITH_MARKETPLACE_URL__ '${APPSMITH_MARKETPLACE_URL}';
+ sub_filter __APPSMITH_SEGMENT_KEY__ '${APPSMITH_SEGMENT_KEY}';
+ sub_filter __APPSMITH_OPTIMIZELY_KEY__ '${APPSMITH_OPTIMIZELY_KEY}';
+ sub_filter __APPSMITH_ALGOLIA_API_ID__ '${APPSMITH_ALGOLIA_API_ID}';
+ sub_filter __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__ '${APPSMITH_ALGOLIA_SEARCH_INDEX_NAME}';
+ sub_filter __APPSMITH_ALGOLIA_API_KEY__ '${APPSMITH_ALGOLIA_API_KEY}';
+ sub_filter __APPSMITH_CLIENT_LOG_LEVEL__ '${APPSMITH_CLIENT_LOG_LEVEL}';
+ sub_filter __APPSMITH_GOOGLE_MAPS_API_KEY__ '${APPSMITH_GOOGLE_MAPS_API_KEY}';
+ sub_filter __APPSMITH_TNC_PP__ '${APPSMITH_TNC_PP}';
+ }
+
+ location /f {
+ proxy_pass https://cdn.optimizely.com/;
+ }
+
+ location /api {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /oauth2 {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /login {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+}
+
+server {
+ listen 443 ssl http2;
+ server_name dev.appsmith.com;
+
+ ssl_certificate /etc/certificate/dev.appsmith.com.pem;
+ ssl_certificate_key /etc/certificate/dev.appsmith.com-key.pem;
+
+ # include /etc/letsencrypt/options-ssl-nginx.conf;
+ # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+ gzip on;
+
+ proxy_ssl_server_name on;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_set_header Accept-Encoding "";
+
+
+ sub_filter_once off;
+ location / {
+ proxy_pass http://localhost:3000;
+ sub_filter __APPSMITH_SENTRY_DSN__ '${APPSMITH_SENTRY_DSN}';
+ sub_filter __APPSMITH_HOTJAR_HJID__ '${APPSMITH_HOTJAR_HJID}';
+ sub_filter __APPSMITH_HOTJAR_HJSV__ '${APPSMITH_HOTJAR_HJSV}';
+ sub_filter __APPSMITH_OAUTH2_GOOGLE_CLIENT_ID__ '${APPSMITH_OAUTH2_GOOGLE_CLIENT_ID}';
+ sub_filter __APPSMITH_OAUTH2_GITHUB_CLIENT_ID__ '${APPSMITH_OAUTH2_GITHUB_CLIENT_ID}';
+ sub_filter __APPSMITH_MARKETPLACE_URL__ '${APPSMITH_MARKETPLACE_URL}';
+ sub_filter __APPSMITH_SEGMENT_KEY__ '${APPSMITH_SEGMENT_KEY}';
+ sub_filter __APPSMITH_OPTIMIZELY_KEY__ '${APPSMITH_OPTIMIZELY_KEY}';
+ sub_filter __APPSMITH_ALGOLIA_API_ID__ '${APPSMITH_ALGOLIA_API_ID}';
+ sub_filter __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__ '${APPSMITH_ALGOLIA_SEARCH_INDEX_NAME}';
+ sub_filter __APPSMITH_ALGOLIA_API_KEY__ '${APPSMITH_ALGOLIA_API_KEY}';
+ sub_filter __APPSMITH_CLIENT_LOG_LEVEL__ '${APPSMITH_CLIENT_LOG_LEVEL}';
+ sub_filter __APPSMITH_GOOGLE_MAPS_API_KEY__ '${APPSMITH_GOOGLE_MAPS_API_KEY}';
+ sub_filter __APPSMITH_TNC_PP__ '${APPSMITH_TNC_PP}';
+ }
+
+ location /f {
+ proxy_pass https://cdn.optimizely.com/;
+ }
+
+ location /api {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /oauth2 {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /login {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+}
+
diff --git a/app/client/docker/templates/nginx-mac.conf.template b/app/client/docker/templates/nginx-mac.conf.template
new file mode 100644
index 000000000000..f51dbf1962e7
--- /dev/null
+++ b/app/client/docker/templates/nginx-mac.conf.template
@@ -0,0 +1,123 @@
+server {
+ listen 80;
+ server_name dev.appsmith.com;
+ client_max_body_size 10m;
+
+ gzip on;
+ gzip_proxied any;
+
+ proxy_ssl_server_name on;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header Accept-Encoding "";
+
+ index index.html index.htm;
+
+ sub_filter_once off;
+ location / {
+ proxy_pass http://host.docker.internal:3000;
+ sub_filter __APPSMITH_SENTRY_DSN__ '${APPSMITH_SENTRY_DSN}';
+ sub_filter __APPSMITH_HOTJAR_HJID__ '${APPSMITH_HOTJAR_HJID}';
+ sub_filter __APPSMITH_HOTJAR_HJSV__ '${APPSMITH_HOTJAR_HJSV}';
+ sub_filter __APPSMITH_OAUTH2_GOOGLE_CLIENT_ID__ '${APPSMITH_OAUTH2_GOOGLE_CLIENT_ID}';
+ sub_filter __APPSMITH_OAUTH2_GITHUB_CLIENT_ID__ '${APPSMITH_OAUTH2_GITHUB_CLIENT_ID}';
+ sub_filter __APPSMITH_MARKETPLACE_URL__ '${APPSMITH_MARKETPLACE_URL}';
+ sub_filter __APPSMITH_SEGMENT_KEY__ '${APPSMITH_SEGMENT_KEY}';
+ sub_filter __APPSMITH_OPTIMIZELY_KEY__ '${APPSMITH_OPTIMIZELY_KEY}';
+ sub_filter __APPSMITH_ALGOLIA_API_ID__ '${APPSMITH_ALGOLIA_API_ID}';
+ sub_filter __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__ '${APPSMITH_ALGOLIA_SEARCH_INDEX_NAME}';
+ sub_filter __APPSMITH_ALGOLIA_API_KEY__ '${APPSMITH_ALGOLIA_API_KEY}';
+ sub_filter __APPSMITH_CLIENT_LOG_LEVEL__ '${APPSMITH_CLIENT_LOG_LEVEL}';
+ sub_filter __APPSMITH_GOOGLE_MAPS_API_KEY__ '${APPSMITH_GOOGLE_MAPS_API_KEY}';
+ sub_filter __APPSMITH_TNC_PP__ '${APPSMITH_TNC_PP}';
+ }
+
+ location /f {
+ proxy_pass https://cdn.optimizely.com/;
+ }
+
+ location /api {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /oauth2 {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /login {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+
+ proxy_pass https://release-api.appsmith.com;
+ }
+}
+
+server {
+ listen 443 ssl http2;
+ server_name dev.appsmith.com;
+
+ ssl_certificate /etc/certificate/dev.appsmith.com.pem;
+ ssl_certificate_key /etc/certificate/dev.appsmith.com-key.pem;
+
+ # include /etc/letsencrypt/options-ssl-nginx.conf;
+ # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+ gzip on;
+
+ proxy_ssl_server_name on;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header Accept-Encoding "";
+
+ index index.html index.htm;
+
+ sub_filter_once off;
+ location / {
+ proxy_pass http://host.docker.internal:3000;
+ sub_filter __APPSMITH_SENTRY_DSN__ '${APPSMITH_SENTRY_DSN}';
+ sub_filter __APPSMITH_HOTJAR_HJID__ '${APPSMITH_HOTJAR_HJID}';
+ sub_filter __APPSMITH_HOTJAR_HJSV__ '${APPSMITH_HOTJAR_HJSV}';
+ sub_filter __APPSMITH_OAUTH2_GOOGLE_CLIENT_ID__ '${APPSMITH_OAUTH2_GOOGLE_CLIENT_ID}';
+ sub_filter __APPSMITH_OAUTH2_GITHUB_CLIENT_ID__ '${APPSMITH_OAUTH2_GITHUB_CLIENT_ID}';
+ sub_filter __APPSMITH_MARKETPLACE_URL__ '${APPSMITH_MARKETPLACE_URL}';
+ sub_filter __APPSMITH_SEGMENT_KEY__ '${APPSMITH_SEGMENT_KEY}';
+ sub_filter __APPSMITH_OPTIMIZELY_KEY__ '${APPSMITH_OPTIMIZELY_KEY}';
+ sub_filter __APPSMITH_ALGOLIA_API_ID__ '${APPSMITH_ALGOLIA_API_ID}';
+ sub_filter __APPSMITH_ALGOLIA_SEARCH_INDEX_NAME__ '${APPSMITH_ALGOLIA_SEARCH_INDEX_NAME}';
+ sub_filter __APPSMITH_ALGOLIA_API_KEY__ '${APPSMITH_ALGOLIA_API_KEY}';
+ sub_filter __APPSMITH_CLIENT_LOG_LEVEL__ '${APPSMITH_CLIENT_LOG_LEVEL}';
+ sub_filter __APPSMITH_GOOGLE_MAPS_API_KEY__ '${APPSMITH_GOOGLE_MAPS_API_KEY}';
+ sub_filter __APPSMITH_TNC_PP__ '${APPSMITH_TNC_PP}';
+ }
+
+
+ location /f {
+ proxy_pass https://cdn.optimizely.com/;
+ }
+
+ location /api {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /oauth2 {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+
+ proxy_pass https://release-api.appsmith.com;
+ }
+
+ location /login {
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Host $host;
+
+ proxy_pass https://release-api.appsmith.com;
+ }
+}
diff --git a/app/client/netlify.toml b/app/client/netlify.toml
index 33e87ca64587..195f047eaf13 100644
--- a/app/client/netlify.toml
+++ b/app/client/netlify.toml
@@ -1,7 +1,18 @@
-[[headers]]
- for = "/static/*"
- [header.values]
- cache-control = "max-age=604800"
+[build]
+ [build.environment]
+# REACT_APP_SENTRY_DSN=
+# REACT_APP_HOTJAR_HJID=
+# REACT_APP_HOTJAR_HJSV=
+# REACT_APP_OAUTH2_GOOGLE_CLIENT_ID=
+# REACT_APP_OAUTH2_GITHUB_CLIENT_ID=
+# REACT_APP_SEGMENT_KEY=
+# REACT_APP_MARKETPLACE_URL=
+# REACT_APP_OPTIMIZELY_KEY=
+# REACT_APP_ALGOLIA_API_ID=
+# REACT_APP_ALGOLIA_API_KEY=
+# REACT_APP_ALGOLIA_SEARCH_INDEX_NAME=
+ REACT_APP_CLIENT_LOG_LEVEL="debug"
+# REACT_APP_GOOGLE_MAPS_API_KEY=
[context.production]
[context.production.environment]
@@ -15,30 +26,18 @@
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
APP_HOST = "release.app.appsmith.com"
-[context.develop]
- [context.develop.environment]
- REACT_APP_ENVIRONMENT = "DEVELOPMENT"
- REACT_APP_BASE_URL = "https://release-api.appsmith.com"
- APP_HOST = "develop.app.appsmith.com"
-
-[context.a]
- [context.a.environment]
- REACT_APP_ENVIRONMENT = "STAGING"
- REACT_APP_BASE_URL = "https://release-api.appsmith.com"
- APP_HOST = "a.app.appsmith.com"
-
-[context.b]
- [context.b.environment]
- REACT_APP_ENVIRONMENT = "STAGING"
- REACT_APP_BASE_URL = "https://release-api.appsmith.com"
- APP_HOST = "b.app.appsmith.com"
-
[context.deploy-preview]
[context.deploy-preview.environment]
REACT_APP_ENVIRONMENT = "STAGING"
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
# Not adding an APP_HOST here because the URL is dynamic in nature and cannot be determined.
+
+[[headers]]
+ for = "/static/*"
+ [header.values]
+ cache-control = "max-age=604800"
+
[[redirects]]
from = "/api/*"
to = "API_PLACEHOLDER/api/:splat"
diff --git a/app/client/package.json b/app/client/package.json
index 5647b5ce7a57..43beb91e15e1 100644
--- a/app/client/package.json
+++ b/app/client/package.json
@@ -117,11 +117,11 @@
"start": "REACT_APP_BASE_URL=https://release-api.appsmith.com REACT_APP_ENVIRONMENT=DEVELOPMENT HOST=dev.appsmith.com craco start",
"build": "./build.sh",
"build-local": "craco --max-old-space-size=4096 build --config craco.build.config.js",
- "build-staging": "REACT_APP_BASE_URL=https://release-api.appsmith.com REACT_APP_ENVIRONMENT=STAGING craco --max-old-space-size=4096 build --config craco.build.config.js",
+ "build-staging": " REACT_APP_ENVIRONMENT=STAGING craco --max-old-space-size=4096 build --config craco.build.config.js",
"test": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh",
"test:ci": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh --env=ci",
"eject": "react-scripts eject",
- "start-prod": "REACT_APP_BASE_URL=https://api.appsmith.com REACT_APP_ENVIRONMENT=PRODUCTION craco start",
+ "start-prod": "REACT_APP_ENVIRONMENT=PRODUCTION craco start",
"cytest": "REACT_APP_TESTING=TESTING REACT_APP_ENVIRONMENT=DEVELOPMENT craco start & ./node_modules/.bin/cypress open",
"test:unit": "$(npm bin)/jest -b --colors"
},
diff --git a/app/client/public/index.html b/app/client/public/index.html
index d19be4efdacb..d18abb3ac9a0 100755
--- a/app/client/public/index.html
+++ b/app/client/public/index.html
@@ -43,7 +43,37 @@
}
};
registerPageServiceWorker();
-
+
+