-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added connection to a host in readme, closed #12 #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, sorry for the very long delay, I completely overlooked this PR.
I think this information can be useful, but I'd prefer to keep the README minimal, and only put basic information in there.
Could you create a docs
directory, and add a markdown file in there with this information? We can add a link in the readme (for example; "more information and documentation can be found in the "docs" directory on GitHub")
@@ -46,6 +46,39 @@ if everything is working. | |||
|
|||
![screenshot](https://raw.githubusercontent.com/thaJeztah/pgadmin4-docker/master/pgadmin-screenshot.png) | |||
|
|||
### Connect to a host running PostgreSQL | |||
|
|||
To connect pgadmin4 with a database running in a host you have to modify two files in the host, pg-hba.conf and postgresql.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you;
- change "pgadmin4" to "pgAdmin 4" (capital "A", and a space before the "4"; it's the preferred naming that's used)
- put the
pg-hba.conf
andpostgresql.conf
in back tics (here, and in the other lines below) so that they are presented in a fixed-width font? i.e.;
To connect pgadmin4 with a database running in a host you have to modify two files in the host, `pg-hba.conf` and `postgresql.conf`
- wrap long lines to 80-characters?
host all all 0.0.0.0/0 trust | ||
``` | ||
|
||
`0.0.0.0/0` means any host is allowed to connect, that can be replaced by the your container ip address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"that can be replaced by the your container ip address"; looks like "your" should be removed; can you change to:
`0.0.0.0/0` means any host is allowed to connect. To restrict access to the pgAdmin container,
you can change this to the containers' IP-address.
|
||
`0.0.0.0/0` means any host is allowed to connect, that can be replaced by the your container ip address | ||
|
||
Open the postgresql.conf changing 9.x to your postgres version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change "postgres version" to "PostgreSQL version"?
```conf | ||
listen_addresses = '*' | ||
``` | ||
`'*'` means your host is listening all ip address. Again, you can replace by your container ip address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`'*'` configures your PostgreSQL server to listen on all IP addresses.
Perhaps remove the second sentence ("Again, you can replace by your container ip address"), because container IP-addresses are generally random assigned, so listening on any address that the container listens on should be good
``` | ||
`'*'` means your host is listening all ip address. Again, you can replace by your container ip address | ||
|
||
Now just discover your local ip using `ifconfig`, and put it in the `hostname/address` field, when create a new server in pgadmin4, to connect the database host. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps something like;
Now, create a new server connection in pgAdmin, and put your hosts' IP-address
in the `host name/address` field. You can find your hosts' IP address using the
`ifconfig` command.
This solved my problem. Maybe it's because I'm a postgres noob, but I think this should be in the readme. |
Closed #12