Configure your website in runtime with environment variables. Also supports React/Angular path rewrite to /index.html
- Make runtime variables available to your JS code
Just include this snippet in your index.html
<!--# include file="_environment.html" -->
Now you can access your environemnt variables via window.environment.<VARIABLE_NAME>
- Directly output variable values to
.html
files
<!--# echo <VARIABLE_NAME> -->
FROM mentatxx/nginx-managed-ssr
COPY build /usr/share/nginx/html
where build
is your built site folder (change to appropriate)