reactioncommerce / reaction-feature-requests

Reaction Feature Requests
13 stars 1 forks source link

Report / Crash on missing env variables before startup #67

Open cmbirk opened 5 years ago

cmbirk commented 5 years ago

@spencern @ticean I've written a small bash script that would look for any .env.example files and pull the env variables ( including plugin directories). It then compares these variables to the existing ones in the root .env. I'm proposing something like this get run before startup so that we don't get 15-20 minutes into the build process and fail on a missing env variable.

Would this bash script be useful here or is there a different mechanism that can handle this instead?

@robbdempsey and I ran into this quite a few times when attempting to get reaction running on his machine.

brent-hoover commented 5 years ago

@cmbirk This script already exists in /bin/setup written by @focusaurus .

cmbirk commented 5 years ago

Would it be possible to add this check to the docker-compose startup script? If a plugin changes or otherwise an env variable gets added it wouldn't get picked up after initial setup.