Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to deploy licensed fonts that can't go into version-control with Capistrano?
    text
    copied!<p>I am using Capistrano to deploy my Rails application to a VPS (as shown in <a href="http://railscasts.com/episodes/335-deploying-to-a-vps" rel="nofollow">episode 335 on railscasts.com</a>). I have some custom fonts I'm using for the application and don't want to check them into source-control for licensing reasons (See clarification at bottom).</p> <p>What's the best way to go about this? Should I edit the deploy.rb file to sftp the <code>assets/webfonts</code> directory from my local computer? Maybe I just need to copy them manually to the <code>my_app/shared/assets</code> directory on the VPS, but I'd rather it be automated as part of the deploy task.</p> <p>Here's my current deploy.rb file:</p> <pre><code>require "rvm/capistrano" require "bundler/capistrano" server "ip_address", :web, :app, :db, primary: true set :application, "armory" set :user, "username" set :deploy_to, "/home/#{user}/apps/#{application}" set :deploy_via, :remote_cache set :use_sudo, false set :scm, "git" set :github_user, "gorrillamcd" set :repository, "git@github.com:#{github_user}/Armory.git" set :branch, "master" default_run_options[:pty] = true ssh_options[:forward_agent] = true after "deploy", "deploy:cleanup" # keep only the last 5 releases namespace :deploy do %w[start stop restart].each do |command| desc "#{command} unicorn server" task command, roles: :app, except: {no_release: true} do run "/etc/init.d/unicorn_#{application} #{command}" end end task :setup_config, roles: :app do sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}" sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}" run "mkdir -p #{shared_path}/config" put File.read("config/database.base.yml"), "#{shared_path}/config/database.yml" puts "Now edit the config files in #{shared_path}." end after "deploy:setup", "deploy:setup_config" task :symlink_config, roles: :app do run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" run "ln -nfs #{shared_path}/config/initializers/stripe.rb #{release_path}/config/initializers/stripe.rb" end after "deploy:finalize_update", "deploy:symlink_config" desc "Make sure local git is in sync with remote." task :check_revision, roles: :web do unless `git rev-parse HEAD` == `git rev-parse origin/master` puts "WARNING: HEAD is not the same as origin/master" puts "Run `git push` to sync changes." exit end end before "deploy", "deploy:check_revision" end </code></pre> <p><strong>Edit:</strong> Sorry for being so vague beforehand. I'm using Museo Slab from myfonts.com and a public repo on github (check my user profile if you want to see it). I read through the license and found this:</p> <blockquote> <p><code>3.</code> The Licensed Webfont(s) may be used on any Website owned or controlled by the Licensee</p> <p><code>4.</code> Agencies responsible for multiple clients’ Websites, for example web design agencies or hosting providers, may not share a single Webfont license across multiple clients’ Websites.</p> </blockquote> <p>Those two lines of the license make me believe that checking the font into a public repository would be against the license, since it could be used on sites that are not mine without obtaining a new license for the font (even though they were free to begin with). I imagine that other people have had this problem before. So my question is, <strong>What's the normal/best way to handle deploy, with Capistrano, fonts (or any file for that matter) that can't be checked into source control?</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload