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

docs: Add a postgres unix example to actually use a unix socket. #443

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

hessjcg
Copy link
Collaborator

@hessjcg hessjcg commented Sep 20, 2023

This provides a new example of how to configure your application to use a unix socket.

@hessjcg hessjcg requested a review from a team as a code owner September 20, 2023 16:44
@hessjcg hessjcg force-pushed the examples-unix-postgres branch from 6eb6eb8 to 3fd3a86 Compare September 20, 2023 17:02
Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

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

Why the Postgres Unix example? Should there be a MySQL example? Are we going to link to this anywhere?

Shall we file an issue capturing why we're doing this work?

@hessjcg
Copy link
Collaborator Author

hessjcg commented Sep 21, 2023

I would like to have an example for how to use unix sockets. I have added a note to #400 to add documentation in the README that will support this example.

I made an example for Postgres but not MySql in order to avoid maintaining redundant examples for each type of database, mysql, postgres, and sql server for a variety of configuration scenarios.

@hessjcg hessjcg mentioned this pull request Sep 21, 2023
periodSeconds: 30
failureThreshold: 3
exec:
command: ["/bin/sh", "-c", "psql --host=$DB_SOCKET_PATH --port=$DB_PORT --username=$DB_USER '--command=select 1' --echo-queries --dbname=$DB_NAME"]
Copy link
Member

Choose a reason for hiding this comment

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

Can we minimize the need for horizontal scroll here? This really hurts readability otherwise.

@hessjcg hessjcg force-pushed the examples-unix-postgres branch from 3fd3a86 to b728c91 Compare October 3, 2023 20:59
@hessjcg hessjcg requested a review from enocom October 3, 2023 21:00
- "-e"
- "-c"
- |+
sleep 10
Copy link
Member

Choose a reason for hiding this comment

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

Shall we add a comment explaining what these two sleep values are for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed.

@hessjcg hessjcg force-pushed the examples-unix-postgres branch from b728c91 to 9ea052b Compare October 17, 2023 17:19
@hessjcg hessjcg requested a review from enocom October 17, 2023 17:19
@hessjcg hessjcg merged commit c9eea7e into main Oct 17, 2023
8 checks passed
@hessjcg hessjcg deleted the examples-unix-postgres branch October 17, 2023 17:45
hessjcg added a commit that referenced this pull request Oct 17, 2023
This provides a new example of how to configure your application to use a unix socket.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants