manafire
manafire

Reputation: 6084

OpsWorks overriding database.yml / ignoring custom JSON

When I deploy a Rails app with OpsWorks, a new database.yml gets created in the shared directory. It ignores the existing database.yml (which rightfully shouldn't be in the repo), and I've also tried specifying custom JSON but nothing works. Maybe I have the structure wrong?

{
  "deploy": {
    "my-app-name": {
      "database": {
        "adapter": "mysql2",
        "encoding": "unicode",
        "host": "xxxxxx.rds.amazonaws.com",
        "port": "3306",
        "database": "db-name",
        "pool": "5",
        "username": "username",
        "password": "password"
      }
    }
  }
}

Upvotes: 7

Views: 3182

Answers (2)

wojciechz
wojciechz

Reputation: 1186

Look also here:

http://wojtek.ziniewi.cz/2013/06/10/custom-symlinks-in-amazon-opsworks-ror-application/

And always remember to examine your stack-json by logging into console of one of your opsworks servers and typing:

opsworks-agent-cli get_json

Upvotes: 4

manafire
manafire

Reputation: 6084

Using the short name for the app worked (without hyphens). I was using the full name before. See: https://forums.aws.amazon.com/message.jspa?messageID=444711

Upvotes: 2

Related Questions