Skip to content
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

feat: support accessing PostgreSQL on unix domain sockets #4456

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

j-baker
Copy link

@j-baker j-baker commented Dec 28, 2024

Fixes #4249.

A common way to deploy Postgres is to not have a port. This can simplify user management as if all users log in using Unix Domain Sockets, the OS handles authentication.

This MR allows the user to optionally provide the directory their socket is stored in.

Copy link

netlify bot commented Dec 28, 2024

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 9154512
🔍 Latest deploy log https://app.netlify.com/sites/teslamate/deploys/677d2ea3cdc7e50008ae92fc
😎 Deploy Preview https://deploy-preview-4456--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brianmay
Copy link
Collaborator

The documentation is potentially confusing: "If this is provided, the database host, port need not be provided.", but above it says DATABASE_USER, DATABASE_PASS, DATABASE_HOST, and DATABASE_PORT are all required values.

Looking at the change, none of the DATABASE_USER, DATABASE_PASS, DATABASE_HOST, and DATABASE_PORT values are required if DATABASE_SOCKET_DIR is set.

Apart from that, assuming it works, looks good to me.

@j-baker
Copy link
Author

j-baker commented Dec 29, 2024

I've adjusted the docs to hopefully make more sense. Can confirm that I'm running with this commit - it does work.

@JakobLichterfeld JakobLichterfeld changed the title Support accessing Postgres on unix domain sockets feat: support accessing PostgreSQL on unix domain sockets Jan 3, 2025
@JakobLichterfeld JakobLichterfeld added the enhancement New feature or request label Jan 3, 2025
Copy link
Collaborator

@JakobLichterfeld JakobLichterfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ty for your contribution!

@JakobLichterfeld JakobLichterfeld added the area:teslamate Related to TeslaMate core label Jan 3, 2025
Copy link
Collaborator

@JakobLichterfeld JakobLichterfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:teslamate Related to TeslaMate core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for socket connection to PostgreSQL
3 participants