jackpine / biketag-ios

http://biketag.jackpine.me
1 stars 1 forks source link

Unable to connect to psql or start the rails container. #40

Closed jmoody closed 9 years ago

jmoody commented 9 years ago

These are the docker containers:

$ docker ps -a
CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS                                      NAMES
9ccc9c91b440        biketag/api:latest       "/sbin/my_init"     6 minutes ago                                                                      biketag-api         
f479ee12d593        biketag/api-dev:latest   "/sbin/my_init"     24 minutes ago      Up 4 minutes        80/tcp, 443/tcp, 0.0.0.0:3000->3000/tcp    biketag-api-dev     
ba13710483bc        biketag/db:latest        "/sbin/my_init"     24 minutes ago      Up 6 minutes        80/tcp, 443/tcp, 0.0.0.0:25432->5432/tcp   biketag-db 

I think I understand the run vs. distinction.

$ boot2docker up
$ docker start < db >
$ docker start < api-dev >

After starting the db and api-dev containers, I am unable to connect to the postgres server:

$  psql -h $(boot2docker ip) -p 25432 --user postgres
psql: could not connect to server: Connection refused
    Is the server running on host "192.168.59.103" and accepting
    TCP/IP connections on port 25432?

I can telnet to the DOCKER_PORT

$ telnet 192.168.59.103 2376

When try to start the rails server, I see no files in the ~/biketag-api-dev directory.

michaelkirk commented 9 years ago

I believe this was resolved with https://github.com/jackpine/biketag-api/commit/5a86bdb865fafa5d9a5499d233c3cc2de2558272.

Re-open if you're still having issues.