-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add ability to connect to PostgreSQL via unix socket #734
Conversation
@vtrf would if be possible some details in https://github.com/juanfont/headscale/blob/main/config-example.yaml, to explain how to use this? I guess an extra line in line 116 clarifying that port should be blank for the socket, and host should be the path to it :) |
@juanfont Is this enough or should I go more in depth about the option? |
config-example.yaml
Outdated
@@ -116,6 +116,9 @@ db_path: /var/lib/headscale/db.sqlite | |||
# # Postgres config | |||
# db_type: postgres | |||
# db_host: localhost | |||
|
|||
# This should be set when using a TCP connection, set it to '0' or keep it unset if | |||
# connecting through a unix socket. |
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.
# connecting through a unix socket. |
config-example.yaml
Outdated
@@ -116,6 +116,9 @@ db_path: /var/lib/headscale/db.sqlite | |||
# # Postgres config | |||
# db_type: postgres | |||
# db_host: localhost | |||
|
|||
# This should be set when using a TCP connection, set it to '0' or keep it unset if |
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.
# This should be set when using a TCP connection, set it to '0' or keep it unset if |
@@ -116,6 +116,9 @@ db_path: /var/lib/headscale/db.sqlite | |||
# # Postgres config |
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.
# # Postgres config | |
# # Postgres config | |
# If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank. |
@vtrf can you have a look at the suggestions? |
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.
LGTM! Thanks!
This is related to #733