Closed tisoportes closed 7 months ago
Minimal supervisord.conf
file with the exact environment=
line from above:
[supervisord]
loglevel = debug
[program:bash]
environment=VERBOSE_LOGGING="true",JWT_SECRET="sUPERSecretPasswordObviousFake="
command = /bin/bash -c "env | grep -E 'VERBOSE_LOGGING|JWT_SECRET'"
startsecs = 0
autorestart = false
Start supervisord
in the foreground with that config:
$ supervisord --version
4.2.5
$ supervisord -n -c supervisord.conf
2024-04-10 13:42:30,386 INFO Increased RLIMIT_NOFILE limit to 1024
2024-04-10 13:42:30,387 INFO supervisord started with pid 20712
2024-04-10 13:42:31,392 INFO spawned: 'bash' with pid 20713
2024-04-10 13:42:31,407 DEBG 'bash' stdout output:
JWT_SECRET=sUPERSecretPasswordObviousFake=
VERBOSE_LOGGING=true
2024-04-10 13:42:31,407 INFO success: bash entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-04-10 13:42:31,408 DEBG fd 7 closed, stopped monitoring <POutputDispatcher at 4349039376 for <Subprocess at 4349040272 with name bash in state RUNNING> (stdout)>
2024-04-10 13:42:31,408 DEBG fd 9 closed, stopped monitoring <POutputDispatcher at 4349069456 for <Subprocess at 4349040272 with name bash in state RUNNING> (stderr)>
2024-04-10 13:42:31,408 INFO exited: bash (exit status 0; expected)
2024-04-10 13:42:31,408 DEBG received SIGCHLD indicating a child quit
The output from env
shows that supervisord
set the environment variables from the config file. Since I can't reproduce the problem, I am going to close this issue.
Why supervisor is not setting correctly env vars?
Here current context:
Settings privilege: root
os: cat /etc/issue Debian GNU/Linux 10 \n \l
python3 --version Python 3.7.3
supervisord --version 4.2.5
current program conf:
Whenever it is checked with the export command there is neither env var. Also rechecked vars with classic echo and no VERBOSE_LOGGING neither JWT_SECRET
I've read Official doc subprocess and tried to set vars in supervisor's conf but also not working. None env var setted. Even more restarted supervisor but got the same issue. So far I am forced to set the variable from console manually :/ .