Your Teacher
Chris Oliver
Hi, I'm Chris. I'm the creator of GoRails, Hatchbox.io and Jumpstart. I spend my time creating tutorials and tools to help Ruby on Rails developers build apps better and faster.
About This Episode
Learn how to deploy ActionCable and Rails 5 with Passenger
Notes
Resources
# If you don't have redis server already installed,
# make sure to install that if you choose to use that as the backend
sudo apt-get install redis-server
# config/cable.yml
production:
url: redis://localhost:6379
local: &local
url: redis://localhost:6379
development: *local
test: *local
# config/routes.rb
mount ActionCable.server => "/cable"
# app/assets/javascripts/channels/index.coffee
App.cable = ActionCable.createConsumer("/cable")
# config/environments/production
config.action_cable.allowed_request_origins = ["https://gorails.com"]
# /etc/nginx/sites-enabled/default
server {
listen 80;
server_name gorails.com;
passenger_enabled on;
rails_env production;
root /home/deploy/gorails/current/public;
location /cable {
passenger_app_group_name gorails_websocket;
passenger_force_max_concurrent_requests_per_process 0;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
Deploying Rails To Production
0% Complete
1
Deploying To Production on Heroku with Puma
24m
How to Deploy ActionCable and Rails 5 To Production
18m
3
Deploying Sidekiq To Heroku
17m
4
Feature Flags with Rollout
17m
5
Security Hardening Servers with Fail2Ban
11m
6
Server Administration with Cockpit
8m
7
How to Deploy Rails to Production on Ubuntu 18.04 Bionic Beaver
32m
8
How to Remove Unused CSS Classes from Tailwind CSS, Boostrap, and more with PurgeCSS
11m
9
Continuous Deployment with Rails & GitHub Actions
10m
10
How to deploy Rails to a Staging Environment
16m
11
How to manage and run Maintenance Tasks for Rails in Production
9m
12
How to Deploy Rails to Fly.io
10m
13
How to Deploy Rails to Render
25m