thathert commented on a change in pull request #15936:
URL: https://github.com/apache/superset/pull/15936#discussion_r679124171



##########
File path: docs/src/pages/docs/installation/index.mdx
##########
@@ -100,3 +100,11 @@ username: admin
 ```bash
 password: admin
 ```
+
+
+### 5. Connecting your local database instance to superset
+
+When running superset using `docker` or `docker-compose` it runs in its own 
docker container, as if the superset was running in a seperate machine 
entirely. Therefore attempts to connect to your local database with hostname 
`localhost` won't work as `localhost` refers to the docker container superset 
is running in, and not your actual host machine. Fortunately docker provides an 
easy way to access network resources in the host machine from inside a 
container, we will leverage this capability to connect to our local database 
instance. Here the instructions are for connecting to postgresql (which is 
running on your host machine) from superset (which is running in its docker 
container). Other databases may have slightly different configurations but gist 
would be same and boils down to 2 steps -
+
+1. Configuring the local postgresql/database instance to accept public 
incoming connections. By default postgresql only allows incoming connections 
from localhost only, but re-iterating once again, `localhosts` are different 
for host machine and docker container. For postgresql this involves make 
one-line changes to the files `postgresql.conf` and `pg_hba.conf`, you can find 
helpful links tailored to your OS / PG version on the web easily for this task.

Review comment:
       Ah yes so maybe it'd be better to split this up. I think what it is, is 
that on mac you can do `host.docker.interal` and don't need to touch your 
postgresql confs. The behavior is described 
[here](https://docs.docker.com/docker-for-mac/networking/#there-is-no-docker0-bridge-on-macos).
   
   On other OS you don't have the magic dns entry and so you need to go through 
the bridge network IP which likely requires the config updates.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to