Getting thin to read configured user environment

痞子三分冷 提交于 2019-12-24 00:27:23

问题


I'm starting thin with a parameter set like the following under ubuntu

chdir: /var/www/myuser/current
rackup: /var/www/myuser/current/config.ru
environment: production
address: 0.0.0.0
port: 3000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 3
daemonize: true
user: myuser
group: myuser

And I want to define a set of environment variables for "myuser" so they can be accessible in the rack application I'm deploying in Thin with ENV['MY_VAR'].

Can I do some configuration without adding the variables one by one to the command line?


回答1:


http://code.macournoyer.com/thin/usage/

You can create a YAML file in your app directory and start up the server like:

thin -C ./config.yml

Either that, or I didn't really understand the question!



来源:https://stackoverflow.com/questions/10294815/getting-thin-to-read-configured-user-environment

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!