Skip to content

Instantly share code, notes, and snippets.

@jackyvo
Created May 29, 2017 17:20
Show Gist options
  • Save jackyvo/d6442fa8f3391040f43a4f66c9417aca to your computer and use it in GitHub Desktop.
Save jackyvo/d6442fa8f3391040f43a4f66c9417aca to your computer and use it in GitHub Desktop.
Carey Deployment
Config Action Cable
1. Edit: /etc/nginx/site-enabled/app.careymedical.com
server {
listen 8888;
server_name app.careymedical.com;
ssl on;
ssl_certificate /etc/ssl/careymedical-chained.crt;
ssl_certificate_key /etc/ssl/careymedical.key;
location / {
proxy_pass http://localhost:28080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
}
2. Update secrects.yml. Add config websocket: wss://app.careymedical.com:8888
3. Create folder: shared/bin and add new file: cable
# /bin/cable
bundle exec puma -p 28080 cable/config.ru -e production -d
4. Run: bin/cable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment