I am trying to host a shiny app on the open source shiny server which is installed on a virtual machine on gcp.
The app is trying to connect to a remote Postgresql database that's also on gcp's cloud sql.
Below is my code.
library(RPostgreSQL) drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, dbname="test", host="**.**.**.**", user="username", password="pwd", port=5432)
I think I know one of the reason why is not working is because I need to white list the ip address but I'm not sure which ip addresses I need to white list, as I have installed the shiny-server on virtual machine on gcp.
If I publish the app on shinyapps.io server it runs perfectly because I white listed the ip addresses it run on.
Can someone please help in finding the ip address of a shiny-server installed on a virtual machine or any suggestions that would help would be great.