当我运行sudo-E supervisor时重新读取/重新加载
我已经在[项目:现场]启动gunicorn.conf.py在
/etc/主管/conf.d/天气.conf在
[program:site]
directory=/home/nhcc/campus-weather-station/weather_station
command=/home/nhcc/venv/weather_station/bin/gunicorn -c /home/nhcc/campus-weather-station/weather_station/gunicorn.conf.py -p gunicorn.pod weather_station.wsgi
在gunicorn.conf.py在
^{pr2}$它会显示错误。在
我在/etc/profile.d中设置DJANGO_WEATHER_STATION_HOST
/项目.sh在
在项目.sh在
export DJANGO_WEATHER_STATION_HOST=the_host_ip
在重新装载之后,但是没有用。在
我还设置了~/.profile
但还是有错误。在
File "/home/nhcc/campus-weather-station/weather_station/gunicorn.conf.py", line 5, in bind = "{}:8080".format(os.environ['DJANGO_WEATHER_STATION_HOST']) File "/usr/lib/python3.5/os.py", line 725, in getitem raise KeyError(key) from None KeyError: 'DJANGO_WEATHER_STATION_HOST'
主管维护自己的环境。在
更多阅读。http://supervisord.org/subprocess.html#subprocess-environment
所以您必须在
/etc/supervisor/conf.d/weather.conf
文件中传递环境。在具有
env
集的/etc/supervisor/conf.d/weather.conf
的Ex。在相关问题 更多 >
编程相关推荐