mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-27 01:05:08 +03:00
a5fe256d7e
* chore: inject enviroment at the deployment phase (#2174) * Dockerfile CMD env.sh * env.sh generates env-config.js file * index.html imports env-config.js * front/src/config/index.ts imports REACT_APP_SERVER_BASE_URL * Upgrade Dockerfiles * Add compute pg_database_url for render * fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
11 lines
282 B
Bash
Executable File
11 lines
282 B
Bash
Executable File
echo "Generating env-config.js file from runtime environment variables..."
|
|
|
|
BASE_FILENAME="build/env-config.js"
|
|
mkdir -p build
|
|
rm -rf "./$BASE_FILENAME"
|
|
|
|
{
|
|
echo "window._env_ = {"
|
|
echo " REACT_APP_SERVER_BASE_URL: \"$REACT_APP_SERVER_BASE_URL\","
|
|
echo "}"
|
|
} > "./$BASE_FILENAME" |