foreman

Why are my Rails initializers caching ENV variables in the console (Foreman, Dev env)

北城以北 提交于 2019-12-06 23:01:22
问题 What started as a minor annoyance has now turned into a headache. I am building a Rails 4 app and am using Foreman for my dev setup with a Procfile and .env file for configuration. When I set an ENV variable in the .env file, it is correctly picked up by my app. In this case I am setting some ENV options for Paperclip in an initializer. The problem surfaces when I go to change the value of the ENV variables. In the console, if I type ENV["MY_VAR"], it shows the new value. However, the value

Flask App failing on heroku, but working with foreman

末鹿安然 提交于 2019-12-06 06:25:44
问题 I'm trying to deploy a fairly basic app with Heroku, and I've been successful before, but for some reason I'm getting an import error when I try now. Foreman start works with no issues, but when I try to start the application up, something seems to happen that breaks imports. This is the log message I get: heroku[web.1]: Starting process with command `python manage.py runserver -p 40309` app[web.1]: Traceback (most recent call last): app[web.1]: File "manage.py", line 6, in <module> app[web.1

Rails + foreman + worker hangs server

℡╲_俬逩灬. 提交于 2019-12-05 22:52:05
问题 On my local machine I'm trying to start my rails app and delayed job worker using Foreman. My Procfile looks like this: web: bundle exec rails server -p $PORT worker: bundle exec rake jobs:work When I start foreman only the first two web requests get executed. With the third request the server hangs. The first request is outputted in the console, the second isn't. If I leave out the worker in my Procfile the server is running just fine and is outputting everything to the console. Also when I

CentOS 6.4下通过Rdo方式安装OpenStack

僤鯓⒐⒋嵵緔 提交于 2019-12-05 15:07:25
环境: VmwareWorkstation+CentOS 6.4(64bit) 关闭防火墙: service iptables stop chkconfig iptables off 关闭selinux: vi /etc/sysconfig/selinux SELINUX=disabled 安装 epel 源 默认使用 base 的源 在后面 packstack --allinone 会报错,这里进行修改. 备份 CentOS-Base.repo 下载国内源: wget http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=2 重命名为mv centos?codeblock=2 CentOS-Base.repo rpm -Uvh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm ( 注意 : 这里需在进入 epel 里面将 HTTPS 方式去掉 ) yum makecache 安装 rdo 与P ackstack wget https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4

Restart single process with Foreman

半城伤御伤魂 提交于 2019-12-05 13:11:59
I've been using foreman for a while now to scale my various ruby processes in a centralized manner, and it is working perfectly for me . Anyways I would like to have some feature to restart a process or even to give it more control like to kill a process and start it again, in the current implementation when I kill one process the whole process in the main foreman stop . any workaround or solution here ? Thanks in advance While foreman start is very convenient for development, I would not recommend it for production. I recommend using upstart, but there are also other alternatives - foreman

Foreman not working with NGINX

安稳与你 提交于 2019-12-05 06:06:58
I'm trying to use Foreman (version 0.31.0) to manage our application's processes but I'm not having much luck with nginx (nginx/1.0.10 + Phusion Passenger 3.0.11). Here's the relevant line from my Procfile: nginx: sudo /home/ubuntu/nginx/sbin/nginx When I start the app, Foreman reports that nginx is started and then immediately terminated: $ foreman start 21:18:28 nginx.1 | started with pid 27347 21:18:28 nginx.1 | process terminated 21:18:28 system | sending SIGTERM to all processes However, nginx is actually running , even though Foreman reports otherwise. Similarly, if I export to Upstart:

RSolr::Error::InvalidRubyResponse - 200 OK

孤街醉人 提交于 2019-12-05 03:40:12
I am getting following error even after starting forreman and starting sunspot:solr : RSolr::Error::InvalidRubyResponse - 200 OK Error: <result status="1">java.lang.NullPointerException at org.apache.solr.handler.XmlUpdateRequestHandler.doLegacyUpdate(XmlUpdateRequestHandler.java:129) at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:87) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet

Why are my Rails initializers caching ENV variables in the console (Foreman, Dev env)

余生长醉 提交于 2019-12-05 03:16:16
What started as a minor annoyance has now turned into a headache. I am building a Rails 4 app and am using Foreman for my dev setup with a Procfile and .env file for configuration. When I set an ENV variable in the .env file, it is correctly picked up by my app. In this case I am setting some ENV options for Paperclip in an initializer. The problem surfaces when I go to change the value of the ENV variables. In the console, if I type ENV["MY_VAR"], it shows the new value. However, the value that was used in my initializer, which presumably was run when I started the console, shows the old

How do I have foreman reload node.js when a file is changed?

陌路散爱 提交于 2019-12-05 02:19:13
问题 I currently use supervisor to run my node.js app when developing locally. This has been great, but I currently store all my configs in my .bash_profile , I want to move them to a .env file. Is there a way to get the environment loading features of foreman with the file watching features of supervisor ? One option is to add it to my Procfile like this, but I suspect that will mess up Heroku. `local: supervisor web.js` 回答1: This is the solution I put together and it works great. Install Rerun

Why is foreman gem ignoring the PORT environment variable?

落花浮王杯 提交于 2019-12-04 11:26:50
问题 I want the foreman gem to use the PORT value provided in the my development env file instead of using its own values. My files setup is shown below: A bash script to start foreman: foreman start -e development.env The development.env file content: PORT=3000 The Procfile content web: bundle exec rails server thin -p $PORT -e $RAILS_ENV $1 The dev server ends up starting on port 5000. I know I can start foreman with --p 3000 to force it to use that port. But that defeats the purpose of the env