Supervisord command with env variables from a specific file loaded
With program:xxx defined in /etc/supervisord/confd/xxx.conf
[program:xxx]
process_name=%(program_name)s
directory=/home/xx/xxx/
command=/home/xx/xxx/runenv.sh .env /home/xx/xxx/xxx arg1 arg2 ..etc
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=xx
numprocs=1
redirect_stderr=true
stdout_logfile=/home/xx/xxx/logs/xx.supervisor.log
stopwaitsecs=3600
It load the application from a executable sh script which basically loads variables from .env file to the user space environment before executes the program itself.
Check the shell script, and you need to make it executable chmod +x runenv.sh