0

I try to run sidekiq service with supervisord

Here's my config:

[program:my-app-sidekiq-staging]
directory=/srv/www/DOMAIN/current
command=RAILS_ENV=production /usr/local/rvm/bin/rvm ruby-2.2.2@my-app-staging do bundle exec sidekiq -e production -d -C config/sidekiq.yml -L log/sidekiq.log
autostart=true
autorestart=true
redirect_stderr=true

After startup I’m have fatal error:

can't find command 'RAILS_ENV=production'

I’m confused, because my config for rails runs without errors

directory=/srv/www/DOMAIN/current
command=RAILS_ENV=production /usr/local/rvm/bin/rvm ruby-2.2.2@my-app-staging do bundle exec passenger start -S tmp/unicorn/ilp-app-unicorn.sock --environment production --friendly-error-pages
rootatdarkstar
  • 1,486
  • 2
  • 15
  • 26

1 Answers1

0

Your environment should not be set in the command but in a separate environment value.

environment=RAILS_ENV=production

See this question.

Supervisor and Environment Variables

Community
  • 1
  • 1
Mike Perham
  • 21,300
  • 6
  • 59
  • 61