My goal is to start sidekiq when the server boots up (I use EC2 with an autoscale group). I know that there are several other reports on how to get sidekiq to start with an upstart at boot, but I don't think my question has been specifically addressed.
I use this wiki - https://github.com/mperham/sidekiq/tree/master/examples/upstart/manage-many and placed the scripts inside /etc/init/sidekiq.confand /etc/init/sidekiq-manager.conf.
I made a couple of small changes as stated in /etc/init/sidekiq.confby changing:
# setuid apps
# setgid apps→ replaced appson ubuntuin both lines, which is the deployment user.
export HOME=/home/apps to export HOME=/home/ubuntu
I also have /etc/sidekiq.confone that includes the following line:
/home/ubuntu/app_dir, 2
Otherwise, these scripts are identical to those included in the reference repo. I get the following errors in my logs ( /var/log/upstart)
/bin/bash: line 19: cd: 2: No such file or directory
Could not locate Gemfile
It looks like he is trying to change the directory except somewhere, /home/ubuntu/app_dirafter which he is in the wrong directory and cannot find my Gemfile.
Somewhere else I need to specify the correct path to my application directory?
Thank!
source
share