docker-nginx-react
docker-nginx-react copied to clipboard
replace %env% in html file while nginx start
Create React APP could inject env into html at build-time. We try to make it injecting at run-time.
like envsubst, we need to replace %env% word in html file with correct env value.
input
<title>%REACT_APP_TITLE%</title>
output
<title>Some Real Title in Docker Env</title>
if env REACT_APP_TITLE not exist, leave <title>%REACT_APP_TITLE%</title> there, don't change.
need to edit start-nginx.sh file