Permalink
Browse files

puma.conf.rb

  • Loading branch information...
sorah committed Oct 22, 2017
1 parent 2030f9a commit d6f81d24632b1fdc13e6e9efd874df70a6cc409b
@@ -1,7 +1,12 @@
#!/bin/bash -e
#!/bin/bash -ex
export PATH=/home/isucon/local/ruby-trunk/bin:$PATH
cd ~/isubata/webapp/ruby/
git pull
mkdir ~/vendor || :
bundle check || bundle install --path ~/vendor/bundle --jobs 300
sudo cp isubata.ruby.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl restart isubata.ruby
@@ -0,0 +1,19 @@
[Unit]
Description = isucon7 qualifier main application in ruby
[Service]
WorkingDirectory=/home/isucon/isubata/webapp/ruby
EnvironmentFile=/home/isucon/env.sh
Environment=RACK_ENV=production
ExecStart = /bundle exec puma -p 5000 -t 10
Restart = always
Type = simple
User = isucon
Group = isucon
RuntimeDirectory=isubata
[Install]
WantedBy = multi-user.target
@@ -2,6 +2,8 @@
threads 32,32
bind 'tcp://0.0.0.0:5000'
bind 'unix:///tmp/puma.sock'
bind 'unix:///run/isubata/puma.sock'
stdout_redirect '/home/isucon/puma.out', '/home/isucon/puma.err', true
preload_app!
@@ -0,0 +1,4 @@
#!/bin/bash
cd "$(dirname $0)"
export PATH=/home/isucon/local/ruby-trunk/bin:$PATH
exec bundle exec puma -c ./puma.conf.rb

0 comments on commit d6f81d2

Please sign in to comment.