Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

replace %env% in html file while nginx start #25

Open
zzswang opened this issue Feb 28, 2020 · 1 comment
Open

replace %env% in html file while nginx start #25

zzswang opened this issue Feb 28, 2020 · 1 comment

Comments

@zzswang
Copy link
Owner

zzswang commented Feb 28, 2020

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.

@zzswang
Copy link
Owner Author

zzswang commented Feb 28, 2020

need to edit start-nginx.sh file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant