Friday, August 4, 2017

[google-cloud-sql-discuss] Unable to connect to Cloud-SQL proxy Docker Image

Hi there,

Have been struggling with this issue for the past three days and even put a support ticket forward but not much progress, so far its been quite frustrating. Enough of my ranting, here goes the issue / scenario:

I have a NodeJS application with postgres database which I put in a docker container called `api`. I have a docker-compose file that automatically builds my applications in a docker container and then push them into GCP  VM. So have got 1) Api docker image, 2) db docker image which was built using Cloud_SQL Proxy image, 3) redis 4) nginx - all docker images. 
When I use just my local postgres database placed in a docker container under the base docker image `postgres:9.6.3-alpine`. I was able to connect fine to my NodeJS application but keep getting `Connection Refused` when I use `gcr.io/cloudsql-docker/gce-proxy:1.10` cloud-sql image.

So the issue is, my NodeJS application (api docker) is unable to connect to the `db` cloud_sql docker image. Not sure how to best resolve this, please assist. Kindly suggest if there are more feasible way to connect to my postgres inside from a docker container (api docker) on GCP.

Thanks in anticipation,

Ife

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/baca2ce1-2d9c-4b28-a707-d36aef35845d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment