Sha256: a358d8b076f8d0db65e2cdef674a14b8ab60398ed961a3dcd388a72cda76610b
Contents?: true
Size: 689 Bytes
Versions: 23
Compression:
Stored size: 689 Bytes
Contents
if system.runs_service?("apache2") && system.has_file?("/usr/bin/rails") apache_vhosts = system["unmanaged_files"].files.select { |f| /vhosts\.d/ =~ f.name }.map(&:name) apache_vhosts.each do |vhost| rails_env = system.read_config(vhost, "PassengerAppEnv") rails_public = system.read_config(vhost, "DocumentRoot") if rails_env && !rails_env.empty? && /public/.match(rails_public) identify "rails", "web" parameter "ports", ["3000:3000"] parameter "links", ["db"] rails_root = File.join(rails_public.gsub(/\/public/, ""), "") extract rails_root, "data" break # for now we only handle the first rails app that was found end end end
Version data entries
23 entries across 23 versions & 1 rubygems