Un-hardcode the website domain in frontend
General task
Problem: We can't build a general purpose docker file of the frontend that could be used on any servers (only a specific one such as test.conduit.wimmalab.org).
Causes:
-
- (/etc/caddy/)Caddyfile has the domain name in it. This file is bundled in the crate.
-
- When the source code is transpiled and minimified into the production version the value of process.env.REACT_APP_BACKEND_URL will be embedded in the final javascript file that is served to the clients web browser.
Implemented solutions:
-
- make a new startup script that updates the config file from env var before running caddy. this script also replaces backend URL with a value from the environment
Checklist as a starter
-
Fix 1. -
Fix 2.
Testing
- Working on new CSC-machine @AB0197