lib/brick/models/project.rb
#initialize the configuration of each service, and put it into services

initialize the configuration of each service, and put it into services
initialize the configuration of each service and put it into services
def init_services_from_config(config_file=nil)
        config_hash = load_yaml_file config_file
        @services = {}
        config_hash.each_key{|key|  
           @services[key] =Service.new("#{@name}_#{key}_1",config_hash[key],@docker_client)        
        }
        @services.each_key{|key|  
            service = @services[key]
            service.update_links @services
            service.update_volumes_from @services
            service.update_image_for_building_tag("#{self.name}_#{key}")
        }
      end
def init_services_from_config ( config_file = nil ) config_hash = load_yaml_file config_file @services = { } config_hash . each_key { | key | @services [ key ] = Service . new ( "#{@name}_#{key}_1" , config_hash [ key ] , @docker_client ) } @services . each_key { | key | service = @services [ key ] service . update_links @services service . update_volumes_from @services service . update_image_for_building_tag ( "#{self.name}_#{key}" ) } end
initialize the configuration of each service, and put it into services
initialize the configuration of each service and put it into services
# config = config_hash.to_ostruct
 #  @services << Service.new(key,eval("config.#{key}"))  

config_file
<not_specific>