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

Support unix sockets and systemd sockets using anyhttp #775

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

balki
Copy link

@balki balki commented Jan 28, 2025

Changes

  1. Add --address option to listen on socket types supported by anyhttp. See: doc

Unix sockets allow secure communication between reverse proxy and pgweb. (unix sockets are protected by filesystem permissions while tcp ports are open to all local users). Also allows to run the service in PrivateNetwork (i.e. no network)

Systemd socket activation has multiple benefits but the most important one is to automatically start the server on new request and shut down when idle. This makes sense for pgweb as it needs to be on only when using the app. On idle, it is shutdown cleanly and thereby releasing all database connections.

See below for arch linux package which uses systemd socket and service files.
https://gitea.balki.me/balki-aur/pgweb/

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.

1 participant