-
-
Save pwmpw/d8896b47e68137a32e709fa0b0352a0e to your computer and use it in GitHub Desktop.
Revisions
-
brycejohnston revised this gist
Jun 29, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,16 +12,17 @@ [Unit] Description=sidekiq # start sidekiq only once the network, logging subsystems and local redis instance are available After=syslog.target network.target redis-server.service postgresql.service [Service] # change path to bundle if not using rbenv Type=simple WorkingDirectory=/home/deploy/myapp/current User=deploy Group=deploy UMask=0002 ExecStart=/home/deploy/.rbenv/shims/bundle exec sidekiq -e production -C config/sidekiq.yml -L log/sidekiq.log ExecStop=/home/deploy/.rbenv/shims/bundle exec sidekiqctl stop /home/deploy/myapp/current/pids/sidekiq.pid # if we crash, restart RestartSec=1 -
brycejohnston created this gist
Jun 29, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ # # systemd unit file for Debian # # Put this in /lib/systemd/system # Run: # - systemctl enable sidekiq # - systemctl {start,stop,restart} sidekiq # # This file corresponds to a single Sidekiq process. Add multiple copies # to run multiple processes (sidekiq-1, sidekiq-2, etc). # [Unit] Description=sidekiq # start sidekiq only once the network, logging subsystems and local redis instance are available After=syslog.target network.target redis-server.service [Service] # change path to bundle if not using rbenv Type=simple WorkingDirectory=/home/deploy/myapp/current ExecStart=/home/deploy/.rbenv/shims/bundle exec sidekiq -e production -C config/sidekiq.yml User=deploy Group=deploy UMask=0002 # if we crash, restart RestartSec=1 Restart=on-failure # output goes to /var/log/syslog StandardOutput=syslog StandardError=syslog # This will default to "bundler" if we don't specify it SyslogIdentifier=sidekiq [Install] WantedBy=multi-user.target