You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heroku free tier applications will idle. Either pay 7$ a month for the hobby dyno or use [UptimeRobot](http://uptimerobot.com) or similar to prevent your instance from sleeping or pay for a production dyno.
34
+
35
+
### Passenger Deployment
36
+
37
+
Deploying on your self-hosted server is fairly easy, it's pretty much following the [tutorial](https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby), but there are some configuration details to pay attention to.
38
+
39
+
+ Change or add the `gem 'puma'` entry in your `Gemfile` to `gem 'passenger'` and `bundle` it
40
+
+ OPTIONAL: To use passenger for developing too, change the `Procfile` to `web: bundle exec passenger start`, to configure the local passenger you could provide an optional `Passenger.json` file ([configuration options](https://www.phusionpassenger.com/library/config/standalone/reference/))
41
+
+ If you want to keep your logs etc. in the correct folders, you could add empty `public/`, `tmp/` and `log` directories. Passenger e.g. will automatically use them for local log files.
42
+
+ Make sure, the right ruby version is [installed](https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/install_language_runtime.html) and your passenger is [ready](https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/install_passenger_main.html) to go.
43
+
+ Clone the repository on your server (You could create a separate user for this) and install the dependencies, by running `bundle install` ([More information](https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/xenial/deploy_app.html))
44
+
+ Edit the web-server configuration according to the examples below
45
+
+`PassengerMaxPreloaderIdleTime 0` or `passenger_max_preloader_idle_time 0;` makes sure to not automatically shut down the process after 5 minutes
46
+
+`PassengerPreStart http://url:port` or `passenger_pre_start http://url:port` will startup the application instantly, without the first HTTP GET-request needed for passenger
47
+
+ To get the `/path/to/ruby` run `passenger-config about ruby-command` and copy the displayed path
48
+
+ Check the config (`nginx -t`) and restart the server with `service nginx restart`
49
+
+ Execute `passenger-status --verbose` to check if your app is working correctly
50
+
+ Optional: restart the passenger app via `passenger-config restart-app /var/www/bot`
0 commit comments