Upstart env stanza not setting environment variables (like NODE_ENV) for Node.js application

后端 未结 4 815
遇见更好的自我
遇见更好的自我 2020-12-24 02:31

I have an Upstart script for my server that looks like this:

description \"myapp node.js server\"

start on runlevel [2345]
stop on shutdown

env NODE_ENV=pr         


        
4条回答
  •  甜味超标
    2020-12-24 02:39

    Just for the record. The Upstart Cookbook recommends the usage of start-stop-daemon instead of su or sudo when your Upstart version does not implement setuid.

    But, unless you are still using 10.04 LTS (Lucid Lynx) which only has Upstart version 0.6.5, you should be using the setuid/setgid directives.

提交回复
热议问题