Skip to content

Instantly share code, notes, and snippets.

@rraallvv
Created October 20, 2018 11:43
Show Gist options
  • Save rraallvv/5363f0db5a8fd844a142af264b10717b to your computer and use it in GitHub Desktop.
Save rraallvv/5363f0db5a8fd844a142af264b10717b to your computer and use it in GitHub Desktop.
Peatio running with puma as a service
[Unit]
Description=Peatio Service
After=network.target mysqld.service
StartLimitInterval=0
[Service]
Type=simple
User=deploy
Group=deploy
WorkingDirectory=/home/deploy/ftp/peatio
Environment="PATH=/home/deploy/.rvm/gems/ruby-2.5.0/bin:/home/deploy/.rvm/gems/ruby-2.5.0@global/bin:/home/deploy/.rvm/rubies/ruby-2.5.0/bin:/home/deploy/.rvm/bin:/home/deploy/bin:/home/deploy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
Environment="GEM_HOME=/home/deploy/.rvm/gems/ruby-2.5.0"
Environment="GEM_PATH=/home/deploy/.rvm/gems/ruby-2.5.0:/home/deploy/.rvm/gems/ruby-2.5.0@global"
Environment="DATABASE_HOST=localhost"
Environment="DATABASE_USER=root"
Environment="DATABASE_PASS=pass"
Environment="RAILS_ENV=production"
Environment="SECRET_KEY_BASE=secret"
ExecStart=/home/deploy/.rvm/bin/rvm-exec ruby-2.5.0 bundle exec puma
#Restart=always
#RestartSec=1
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment