* Use envsubst and nginx templates to generate nginx configs which can substitute environment variables and inject into the index.html file * Fix path in dockerfile. Add .gitignore and .env.example files. Fix nginx-linux template. * Add all environment variables. Add prefix to all environment variables. Update scripts to attempt to substitute all environment variables with the prefix * Setup dockerfile to execute a bash script. use env.example for fetching environment variables in development * Toggle features based on injected configs. Fix nginx template substitution script. * Update env.example file * Remove debug code from start-nginx.sh * Fix nginx config templates by adding quotes by default. Fix sed regex to include numerals. Toggle social login buttons on Login page based on the config. * Update rapid api environment variable name. Toggle oauth buttons based on config in SignUp page. Update .env.example to be a union of server and client environment variables * Adding a Map disabled message on Map widget * Adding links to Privacy policy and TNC * Use REACT_APP_ env variables with higher priority over injected config variables for toggling features * Update netlify.toml by commenting out the build environment variables * Remove env variables not required by the client * Remove start-storybook entry from package.json * Fix netlify.toml. Fallback algolia configs * Add contexts to netlify.toml for successful deploys. Swith to using APPSMITH_MARKETPLACE_URL as the toggle for RapidAPI feature on the client. Remove comments in nginx config templates. Fix template used in dockerfile. Co-authored-by: Satbir Singh <apple@apples-MacBook-Pro.local> Co-authored-by: Satbir Singh <satbir121@gmail.com>
72 lines
1.9 KiB
TOML
72 lines
1.9 KiB
TOML
[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]
|
|
REACT_APP_ENVIRONMENT = "PRODUCTION"
|
|
REACT_APP_BASE_URL = "https://api.appsmith.com"
|
|
APP_HOST = "app.appsmith.com"
|
|
|
|
[context.release]
|
|
[context.release.environment]
|
|
REACT_APP_ENVIRONMENT = "STAGING"
|
|
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
|
|
APP_HOST = "release.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"
|
|
status = 200
|
|
force = true
|
|
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
|
|
|
|
[[redirects]]
|
|
from = "/oauth2/*"
|
|
to = "API_PLACEHOLDER/oauth2/:splat"
|
|
status = 200
|
|
force = true
|
|
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
|
|
|
|
[[redirects]]
|
|
from = "/login/*"
|
|
to = "API_PLACEHOLDER/login/:splat"
|
|
status = 200
|
|
force = true
|
|
headers = { X-Forwarded-Host = "APP_HOST_PLACEHOLDER", X-Forwarded-Proto = "https" }
|
|
|
|
[[redirects]]
|
|
from = "/f/*"
|
|
to = "https://cdn.optimizely.com/:splat"
|
|
status = 200
|
|
force = true
|
|
|
|
# This must be the last redirect in the chain because it's a catch-all
|
|
[[redirects]]
|
|
from = "/*"
|
|
to = "/index.html"
|
|
status = 200 |