Sjors / matreon

Self hosted platform to receive money from your supporters, using Bitcoin Lightning network
MIT License
35 stars 2 forks source link

Make puma config work with any application root path #73

Closed kristinalim closed 6 years ago

kristinalim commented 6 years ago

Description

Make puma config work with any application root path.

The puma config currently requires the application to be located in /var/www/matreon/.

Context

If the application is not in /var/www/matreon/, running puma fails with:

=== puma startup: 2018-07-16 03:27:24 +0800 ===
Errno::ENOENT: No such file or directory @ rb_sysopen - /var/www/matreon/tmp/puma.pid
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/launcher.rb:130:in `initialize'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/launcher.rb:130:in `open'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/launcher.rb:130:in `write_pid'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/launcher.rb:103:in `write_state'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/cluster.rb:445:in `run'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/launcher.rb:183:in `run'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/lib/puma/cli.rb:77:in `run'
  /home/klim/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.11.3/bin/puma:10:in `<top (required)>'
  /home/klim/.rbenv/versions/2.4.2/bin/puma:23:in `load'
  /home/klim/.rbenv/versions/2.4.2/bin/puma:23:in `<top (required)>'
Sjors commented 6 years ago

Thanks, I forgot to check the local dev server during my work on AWS CloudFormation support.