Guest User

Untitled

a guest
Dec 18th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. [Unit]
  2. Description=sidekiq
  3. After=syslog.target network.target
  4.  
  5. [Service]
  6. Type=simple
  7. WorkingDirectory=/var/www/my_app/code
  8. ExecStart=/bin/bash -lc 'bundle exec sidekiq -e production -C config/sidekiq.yml'
  9. User=deploy
  10. Group=deploy
  11. UMask=0002
  12.  
  13. # if we crash, restart
  14. RestartSec=4
  15. #Restart=on-failure
  16. Restart=always
  17.  
  18. # output goes to /var/log/syslog
  19. StandardOutput=syslog
  20. StandardError=syslog
  21.  
  22. # This will default to "bundler" if we don't specify it
  23. SyslogIdentifier=sidekiq
  24.  
  25. [Install]
  26. WantedBy=multi-user.target
  27.  
  28. ---
  29. :verbose: true
  30. :concurrency: 4
  31. :pidfile: tmp/pids/sidekiq.pid
  32. :queues:
  33. - [critical, 2]
  34. - default
  35. - low
  36.  
  37. production:
  38. :concurrency: 15
  39.  
  40. Sidekiq.configure_server do |config|
  41. config.redis = { url: "redis://#{ENV['SITE']}:6379/0", password: ENV['REDIS_PWD'] }
  42. end
  43.  
  44. Sidekiq.configure_client do |config|
  45. config.redis = { url: "redis://#{ENV['SITE']}:6379/0", password: ENV['REDIS_PWD'] }
  46. end
  47.  
  48. Dec 18 00:13:39 jjflo systemd[1]: Started sidekiq.
  49. Dec 18 00:13:48 jjflo sidekiq[8159]: Cannot load `Rails.application.database_configuration`:
  50. Dec 18 00:13:48 jjflo sidekiq[8159]: key not found: "MY_APP_DATABASE_PASSWORD"
  51.  
  52. cd /var/www/my_app/code
  53. su - sesame
  54. /bin/bash -lc 'bundle exec sidekiq -e production -C config/sidekiq.yml'
Add Comment
Please, Sign In to add comment