| 1 | The https://patterns.transitionresearchnetwork.org/ site now uses Phusion Passenger, see TransitionResearchWagn. |
| 2 | |
| 3 | Following is a copy of the information from the TransitionResearchWagn page from when it was using WEBrick. |
| 4 | |
| 5 | |
| 6 | == WEBrick config == |
| 7 | |
| 8 | This server was running via a Nginx reverse proxy to WEBrick but was switched to Phusion Passenger on ticket:691, the following documentation is left here for historic reasons: |
| 9 | |
| 10 | To start and stop the WEBrick server: |
| 11 | |
| 12 | {{{ |
| 13 | sudo -i |
| 14 | su-wagn |
| 15 | wagn-start |
| 16 | wagn-stop |
| 17 | }}} |
| 18 | |
| 19 | |
| 20 | === Scripts === |
| 21 | |
| 22 | A couple of scripts have been written to start and stop the WEBrick server: |
| 23 | |
| 24 | ==== wagn-start ==== |
| 25 | |
| 26 | {{{ |
| 27 | #!/bin/bash |
| 28 | |
| 29 | env STATIC_ASSETS=true bundle exec rails server --binding=127.0.0.1 -d |
| 30 | }}} |
| 31 | |
| 32 | ==== wagn-stop==== |
| 33 | |
| 34 | {{{ |
| 35 | #!/bin/bash |
| 36 | |
| 37 | kill -INT $(cat /web/wagn/tmp/pids/server.pid) |
| 38 | }}} |
| 39 | |
| 40 | === Install Notes === |
| 41 | |
| 42 | See ticket:561 |
| 43 | |
| 44 | The WEBrick server is set to start following a reboot via this in the wagn users crontab: |
| 45 | |
| 46 | {{{ |
| 47 | @reboot /web/wagn/bin/wagn-start |
| 48 | }}} |
| 49 | |
| 50 | See the wagn-start and wagn-stop scripts below. |
| 51 | |