Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
$ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3
$ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3
$ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3
server { listen 80; listen [::]:80; server_name YOUR_DOMAIN.ORG; # If you deploy without DNS and SSL, you could leave servername blank like below # server_name _; root /home/deploy/APPNAME/current/public; passenger_enabled on; passenger_app_env production; passenger_env_var RUBYOPT '-r bundler/setup'; # Cf issue: https://github.com/phusion/passenger/issues/2409 # Uncomment if you use ActionCable and/or Turbo Streams # location /cable { # passenger_app_group_name APPNAME_websocket; # passenger_force_max_concurrent_requests_per_process 0; # } # Allow uploads up to 100MB in size client_max_body_size 100m; location ~ ^/assets { expires max; gzip_static on; } }
set :application, "APPNAME" set :repo_url, "[email protected]:USERNAME/APPNAME.git" # Also works with non-github repos, I roll my own gitolite server set :deploy_to, "/home/deploy/#{fetch :application}" set :rbenv_prefix, '/usr/bin/rbenv exec' # Cf issue: https://github.com/capistrano/rbenv/issues/96 append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', '.bundle', 'public/system', 'public/uploads'
Related posts
- Ask HN: Deploying my project on multiple servers?
- Rails 7: production deploy from scratch (Ubuntu 22.04 edition)
- A complete guide to deploying Rails on an Ubuntu VirtualBox VM
- Massh v1.7.0 - Distributed SSH with concurrent session streaming.
- Approach to zero downtime deployment when not using vercel infrastructure?