mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Updated sidekiq service configuration with automatic ruby/gemset version pick (#4907)
RVM has option to run commands in specific directory, and if this directory has `.ruby-version` (with optional `.ruby-gemset`) or `.rvmrc` files in it, this version is automatically used. Thanks to this, you no longer need to update systemd service configuration on Ruby version change.
This commit is contained in:
parent
6e4333c084
commit
dae5debf84
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ WorkingDirectory=/opt/myapp/current
|
|||
# If you use rvm in production without gemset and your ruby version is 2.6.5
|
||||
# ExecStart=/home/deploy/.rvm/gems/ruby-2.6.5/wrappers/bundle exec sidekiq -e production
|
||||
# If you use rvm in production with gemset and your ruby version is 2.6.5
|
||||
ExecStart=/home/deploy/.rvm/gems/ruby-2.6.5@gemset-name/wrappers/bundle exec sidekiq -e production
|
||||
# ExecStart=/home/deploy/.rvm/gems/ruby-2.6.5@gemset-name/wrappers/bundle exec sidekiq -e production
|
||||
# If you use rvm in production with gemset and ruby version/gemset is specified in .ruby-version,
|
||||
# .ruby-gemsetor or .rvmrc file in the working directory
|
||||
ExecStart=/home/deploy/.rvm/bin/rvm in /opt/myapp/current do bundle exec sidekiq -e production
|
||||
|
||||
# Use `systemctl kill -s TSTP sidekiq` to quiet the Sidekiq process
|
||||
|
||||
|
|
Loading…
Reference in a new issue