Class: Conjure::Provision::Postgres
- Inherits:
-
Object
- Object
- Conjure::Provision::Postgres
- Defined in:
- lib/conjure/provision/postgres.rb
Instance Method Summary collapse
-
#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
#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" => @ip_address, "username" => "db", "password" => @password, "template" => "template0", } end |
#start ⇒ Object
13 14 15 |
# File 'lib/conjure/provision/postgres.rb', line 13 def start @ip_address = dockerfile.build(@platform).start("/sbin/my_init") end |