In keter 1.6 when I am using the new config format (stanzas), and listing variables to be passed down (through env), if setuid is set in the global config, then the listed variables end up not being passed down to the app. I am theorizing that this is caused by the variables being somehow lost with sudo being called. However, strangely enough, this is only the case for the environment variables listed in the app config. The environment variables always passed down by keter (port) and the ones passed down from the postgres plugin aren't affected.
Attached are sample app keter.yaml and global keter-config.yaml files:
root: /var/www/keter
listeners:
- host: "*4"
port: 80
# HTTPS
# Disabling this allows the enviroment variable "env:Production" to be passed down to the app
setuid: www-data
stanzas:
- type: webapp
exec: ../bin/example
host: localhost
env:
ENV: Production
plugins:
postgers: true
postgres:
- server: localhost
port: 5432