Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I setup a DigitalOcean Ubuntu 22 droplet to host a docker swarm with containers for a rails app, postgress, and redis. I’m not able to get action cable to work with puma and nginx. I see errors in the browser console for:
WebSocket connection to wss://mydomain.com/cable failed
I followed these guides: Setting up nginx as a reverse proxy: https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-reverse-proxy-on-ubuntu-22-04
Encrypting nginx: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
My /etc/nginx/sites-available/mydomain.com
server {
server_name mydomain.com www.mydomain.com;
location / {
proxy_pass http://127.0.0.1:3000;
include proxy_params;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name mydomain.com www.mydomain.com;
return 404; # managed by Certbot
}
My cable.yml
development:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://redis:6379" } %>
channel_prefix: study_notes_development
test:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://redis:6379" } %>
channel_prefix: study_notes_test
production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://redis:6379" } %>
channel_prefix: study_notes
my docker-stack.yml
version: '3'
services:
db:
image: postgres
volumes:
- db_data:/var/lib/postgresql/data
env_file:
- .env.production.local
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
redis:
image: redis:latest
volumes:
- redis:/data
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
cron:
image: myimage:cron
env_file:
- .env.production
- .env.production.local
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
web:
image: myimage:prod
env_file:
- .env.production
- .env.production.local
ports:
- "3000:3000"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
db_migrator:
image: myimage:prod
command: ["./wait-for","--timeout=300","db:5432","--","bin/rails","db:migrate","db:seed"]
env_file:
- .env.production
- .env.production.local
deploy:
restart_policy:
condition: none
volumes:
db_data:
redis:
hashembarret@gmail.com
Witomir Łękowski
doug.landau
5350d4b31109448dbeb34a6ffc857a
RuRo
max johnson
rem3n
bo
d.mckinstry
Jim Cason
Charles kubai
Charles kubai