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

Expose UNIX socket for Docker #7224

Merged
merged 19 commits into from
Mar 26, 2024
Merged

Conversation

DJviolin
Copy link
Contributor

@DJviolin DJviolin commented Feb 19, 2024

In this entrypoint.sh modification, we expose an UNIX socket for Docker placed at /run/pgadmin/pgadmin.sock. If PGADMIN_ENABLE_SOCK environment variable is not empty, it will create /run/pgadmin folder with pgadmin:root rights and gunicorn creating it's socket there.

I decided to not give the location from the environment variable, because user can create it anywhere in the file system, raising possible problems. Also placed in a folder, not directly in /run, because in a Docker Compose stack helping to create a separate named volume only for this socket.

Needs testing from others.

This pull request is originally mentoined in my issue here: #7221

Renamed `PGADMIN_SOCK` to `PGADMIN_ENABLE_SOCK` following the naming convention.
…creating the folder with root:root rights instead of pgadmin:root
…creating the folder with root:root rights instead of pgadmin:root
… because sometimes created the folders with root:root instead of pgadmin:root
@DJviolin
Copy link
Contributor Author

I moved mkdir from entrypoint.sh into Dockerfile, because for some reason, not always ran with pgadmin:root rights.

Dockerfile Show resolved Hide resolved
@khushboovashi
Copy link
Contributor

@DJviolin, can you please update your branch?

@DJviolin
Copy link
Contributor Author

DJviolin commented Mar 8, 2024

I pulled the latest branch. Can you please verify the behavior of the mkdir command with multiple dirs? In my end, works without problem, creating multiple directories. If this is a problem, I gladly make it a separate command for the second dir. What do you suggest?

@khushboovashi khushboovashi merged commit 715839d into pgadmin-org:master Mar 26, 2024
32 checks passed
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.

None yet

3 participants