omnivore/packages/web/env.sh
Tom Rogers ae6a25fe6d
Some checks failed
Build Docker Images / Build docker images (push) Has been cancelled
Build Self-Hosting Docker Images / Build self-host docker images (push) Has been cancelled
Run tests / Run Codebase tests (push) Has been cancelled
Run tests / Build docker images (push) Has been cancelled
Create a Docker Image for Web (#4533)
2025-02-05 15:37:58 +01:00

21 lines
614 B
Bash

#!/bin/sh
if [ -z "$SERVER_BASE_URL" ]; then
echo "Error: SERVER_BASE_URL environment variable is not set."
exit 1
fi
file_contents=$(cat /app/packages/web/public/env.js)
new_contents=${file_contents//\{\{SERVER_BASE_URL\}\}/$SERVER_BASE_URL}
echo "$new_contents" > /app/packages/web/public/env.js
if [ -z "$BASE_URL" ]; then
echo "Error: BASE_URL environment variable is not set."
exit 1
fi
file_contents=$(cat /app/packages/web/public/env.js)
new_contents=${file_contents//\{\{BASE_URL\}\}/$BASE_URL}
echo "$new_contents" > /app/packages/web/public/env.js
yarn workspace @omnivore/web start