class RubyYacht::App
This class models an app that’s part of the local system.
See RubyYacht::App::DSL
for information on configuring the app.
Attributes
database_name[RW]
The name of the database that this app uses as its data store.
name[RW]
The name of the app
port[RW]
The port that the app listens on.
repository_name[RW]
The name of the repository where the app’s code is stored, relative To the project’s repository domain.
server_type[RW]
The type of app this is, which determines what hooks and scripts we run when building it.
For instance, this would be ‘rails` for a Rails app.
Public Instance Methods
container_name()
click to toggle source
This method gets the name of the image / container that this app will run in.
# File lib/ruby_yacht/dsl/app.rb, line 32 def container_name project = self.project if project.system_prefix == self.name return "#{project.system_prefix}" else return "#{project.system_prefix}-#{self.name}" end end
database()
click to toggle source
This method gets the database that the app connects to.
### Returns RubyYacht::Database
# File lib/ruby_yacht/dsl/app.rb, line 45 def database project.databases.find { |database| database.name == database_name } end
project()
click to toggle source
The project that includes this app.
# File lib/ruby_yacht/dsl/app.rb, line 26 def project RubyYacht.configuration.projects.find { |project| project.apps.include?(self) } end