Please help me understand the uWSGI configuration logic. I have an environment variable ENVIRONMENT. Let them say that its meanings can be either devor prod. I want to set configuration parameters based on valueENVIRONMENT
if-env= ENVIRONMENT
if-opt: %(_)=dev
print = RUNNING %(_)
endif:
endif =
running = ENVIRONMENT
if-opt: running=dev
print = RUNNING %(_)
endif:
I would suggest that if ENVIRONMENTset to prod, none of the assignments or printstatements inside the block if-optwill be executed. But this is not so.
source
share