of Capistrano lock '3.6.1' set :application, 'my_app_name' set :repo_url, '[email protected]:me/my_repo.git' # Default branch is :master # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp # Default deploy_to directory is /var/www/my_app_name # set :deploy_to, '/var/www/my_app_name' # Default value for :linked_files is [] # append :linked_files, 'config/database.yml', 'config/secrets.yml' # Default value for linked_dirs is [] # append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system' # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } # Default value for keep_releases is 5 # set :keep_releases, 5 set :sidekiq_options_per_process, ["--queue high", "--queue default --queue low"]
a single server with a list of roles and multiple properties. # You can define all roles on a single server, or split them: # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value # server 'db.example.com', user: 'deploy', roles: %w{db} # role-based syntax # ================== # Defines a role with one or multiple servers. The primary server in each # group is considered to be the first unless any hosts have the primary # property set. Specify the username and a domain or IP for the server. # Don't use `:all`, it's a meta role. # role :app, %w{[email protected]}, my_property: :my_value # role :web, %w{[email protected][email protected]}, other_property: :other_value # role :db, %w{[email protected]}
1.Cliente pide una pressigned url para subir la imagen 2.Server responde con una URL válida por un lapso de tiempo corto 3.Cliente sube la imagen a S3 directamente
URL for SDK for Ruby - Version 2. require 'aws-sdk-resources' require 'net/http' s3 = Aws::S3::Resource.new(region:'us-west-2') obj = s3.bucket('BucketName').object('KeyName') # Replace BucketName with the name of your bucket. # Replace KeyName with the name of the object you are creating or replacing. url = URI.parse(obj.presigned_url(:put)) return url