问题
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