This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new e1ddba9c0f docs: rewrite superset docker localhost prose (#25296)
e1ddba9c0f is described below

commit e1ddba9c0f41a4cdedc69b70b426f596c5c6c3f6
Author: Josh Soref <[email protected]>
AuthorDate: Thu Sep 14 08:31:56 2023 -0400

    docs: rewrite superset docker localhost prose (#25296)
    
    Signed-off-by: Josh Soref <[email protected]>
---
 docs/docs/installation/installing-superset-using-docker-compose.mdx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/docs/docs/installation/installing-superset-using-docker-compose.mdx 
b/docs/docs/installation/installing-superset-using-docker-compose.mdx
index 9493cca435..d0451fb19a 100644
--- a/docs/docs/installation/installing-superset-using-docker-compose.mdx
+++ b/docs/docs/installation/installing-superset-using-docker-compose.mdx
@@ -138,9 +138,9 @@ password: admin
 
 ### 5. Connecting Superset to your local database instance
 
-When running Superset using `docker` or `docker-compose` it runs in its own 
docker container, as if the Superset was running in a separate 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, and we will leverage this c [...]
+When running Superset using `docker` or `docker-compose` it runs in its own 
docker container, as if the Superset was running in a separate machine 
entirely. Therefore attempts to connect to your local database with the 
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, and we will leverage th [...]
 
 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. **(Mac users may skip this step)** 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 tas [...]
-2. Instead of `localhost`, try using `host.docker.internal` (Mac users, 
Ubuntu) or `172.18.0.1` (Linux users) as the host name when attempting to 
connect to the database. This is docker internal detail, what is happening is 
that in Mac systems docker creates a dns entry for the host name 
`host.docker.internal` which resolves to the correct address for the host 
machine, whereas in linux this is not the case (at least by default). If 
neither of these 2 hostnames work then you may want to f [...]
+1. **(Mac users may skip this step)** Configuring the local 
postgresql/database instance to accept public incoming connections. By default, 
postgresql only allows incoming connections from `localhost` and under Docker, 
unless you use `--network=host`, `localhost` will refer to different endpoints 
on the host machine and in a docker container respectively. Allowing postgresql 
to accept connections from the Docker involves making one-line changes to the 
files `postgresql.conf` and `pg_hba. [...]
+2. Instead of `localhost`, try using `host.docker.internal` (Mac users, 
Ubuntu) or `172.18.0.1` (Linux users) as the hostname when attempting to 
connect to the database. This is a Docker internal detail -- what is happening 
is that, in Mac systems, Docker Desktop creates a dns entry for the hostname 
`host.docker.internal` which resolves to the correct address for the host 
machine, whereas in Linux this is not the case (at least by default). If 
neither of these 2 hostnames work then you m [...]

Reply via email to