Class: Conjure::Provision::Postgres
- Inherits:
-
Object
- Object
- Conjure::Provision::Postgres
- Defined in:
- lib/conjure/provision/postgres.rb
Instance Method Summary collapse
- #container_link ⇒ Object
-
#initialize(platform) ⇒ Postgres
constructor
A new instance of Postgres.
- #rails_config ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(platform) ⇒ Postgres
Returns a new instance of Postgres.
7 8 9 10 11 |
# File 'lib/conjure/provision/postgres.rb', line 7 def initialize(platform) @platform = platform @name = "conjure_db_#{SecureRandom.hex 8}" @password = new_password end |
Instance Method Details
#container_link ⇒ Object
28 29 30 |
# File 'lib/conjure/provision/postgres.rb', line 28 def container_link {container_name => container_name} end |
#rails_config ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/conjure/provision/postgres.rb', line 17 def rails_config { "adapter" => "postgresql", "database" => @name, "host" => container_name, "username" => "db", "password" => @password, "template" => "template0", } end |
#start ⇒ Object
13 14 15 |
# File 'lib/conjure/provision/postgres.rb', line 13 def start @ip_address = server_template.build(@platform).start_daemon("/sbin/my_init", ) end |