变薄以读取配置的用户环境 [英] Getting thin to read configured user environment
本文介绍了变薄以读取配置的用户环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 ubuntu 下使用如下参数集开始瘦
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
并且我想为myuser"定义一组环境变量,以便可以在我使用 ENV['MY_VAR']
在 Thin 中部署的机架应用程序中访问它们.
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?
推荐答案
http://code.macournoyer.com/thin/usage/
您可以在您的应用程序目录中创建一个 YAML 文件并启动服务器,如下所示:
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!
这篇关于变薄以读取配置的用户环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文