Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start-doltlab.sh should use .env #55

Open
bitfactory-sem-denbroeder opened this issue Feb 15, 2023 · 0 comments
Open

start-doltlab.sh should use .env #55

bitfactory-sem-denbroeder opened this issue Feb 15, 2023 · 0 comments

Comments

@bitfactory-sem-denbroeder
Copy link

bitfactory-sem-denbroeder commented Feb 15, 2023

The start doltab shell script should use .env files by default if found so that server admins only have to set these once and run the script instead of constantly setting these env vars.

I suggest something like the following code:

unamestr=$(uname)
if [ -f .env ]; then
	echo 'environment file found'
	if [ "$unamestr" = 'Linux' ]; then
	  export $(grep -v '^#' .env | xargs -d '\n')
	elif [ "$unamestr" = 'Darwin' ]; then
	  export $(grep -v '^#' .env | xargs -0)
	fi
fi

this would load the .env into the environment at runtime

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

No branches or pull requests

1 participant