Kloadut / dokku-pg-plugin

PostgreSQL plugin for Dokku
201 stars 75 forks source link

Rails unable to access through credential... #68

Open tomsoft1 opened 9 years ago

tomsoft1 commented 9 years ago

It's probably a configuration issue, but I fon't know where I can get some help on this.

So here is the issue:

I've created the database using the 'dokku postgres:create gardian' command

I've installed the application container using the gardian name

I see both container using docker ps

I can log to the database using psql with the credential given by the dokku postgres:info command but my application container can not access it! I have a time out error

Here is the status of a docker -ps during a rake db:migrate attempt

CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                     NAMES

21e98fc9c45e        dokku/gardian:latest        "/exec bundle exec r   9 seconds ago       Up 8 seconds                                  jovial_hoover
47a17b814535        postgresql/gardian:latest   "/usr/bin/start_pgsq   25 hours ago        Up 25 hours         0.0.0.0:49175->5432/tcp   berserk_bohr        

The rake db:migrate return a time out error complaing that it can not connect?. I've verified several times, and the credential are ok (username, password, host, port, db)

Any help?

wlaurance commented 9 years ago

I had to reset my DATABASE_URL to include the ip address and port.

See if dokku config app DATABASE_URL includes the ip address and port.