Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

supervisord与ghost博客

$
0
0

之前有一篇文章讲过用supervervisord怎么都无法将环境变量传到supervisord的command中去。

文章地址:http://www.rendoumi.com/supervisordlai-kong-zhi-nodejs/

现在同样的问题反复,我们仔细研究下,不能粗暴的去动supervisord的启动脚本。

[program:ghost]
command=env NODE_ENV="production" /root/.nvm/versions/node/v0.12.12/bin/node /root/www/index.js  
user=root  
autostart=true  
autorestart=true  

最终方案是在command命令行之前加上env NODE_ENV="production"就可以了

古怪的是环境变量无法通过environment来设置,以及directory也无法生效。估计跟root的身份有关。


Viewing all articles
Browse latest Browse all 290

Trending Articles