Please help me understand uWSGI configuration logic.
I have an environment variable ENVIRONMENT. Let's say its values can either be dev or prod. I want to set configuration options based on value of ENVIRONMENT
# always executes print statement, doesn't matter what ENVIRONMENT is set to
if-env= ENVIRONMENT
if-opt: %(_)=dev
print = RUNNING %(_)
endif:
endif =
# always executes print statement, doesn't matter what ENVIRONMENT is set to
running = ENVIRONMENT
if-opt: running=dev
print = RUNNING %(_)
endif:
I would assume if ENVIRONMENT is set to prod none of the assignments or print statements inside if-opt block would execute. But this not the case.