django-watchman icon indicating copy to clipboard operation
django-watchman copied to clipboard

Check for required environment variables

Open mwarkentin opened this issue 9 years ago • 3 comments

Configure a list of environment variables to assert are set in settings.py.

Should there be some default environment variables to check?

  • SECRET_KEY
  • WATCHMAN_TOKENS
  • ??

mwarkentin avatar Dec 01 '15 19:12 mwarkentin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 30 '18 22:01 stale[bot]

Personally I do not understand this check. If the evn variable is required, you server will not just start and already will produce 502 or ConnectionRefused. If the variable is there, then everything is started and no need to check anything. Am I missing something here?

sshishov avatar Feb 25 '22 16:02 sshishov

@sshishov it's been quite a while since I opened this ticket, but I think what I was thinking was around the possibility of using Django-watchman as a check on a new deployment before cutting traffic over..

  1. Deploy new code but don't send traffic yet
  2. Manually or automatically use the watchman CLI on the new release to confirm everything is looking good (including expected env vars are set)
  3. If good, begin rolling out new release - otherwise fail and alert about the bad deploy

mwarkentin avatar Feb 28 '22 15:02 mwarkentin