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

[Idea] Configure location of pghero.yaml via ENV #273

Closed
azanar opened this issue May 31, 2019 · 3 comments
Closed

[Idea] Configure location of pghero.yaml via ENV #273

azanar opened this issue May 31, 2019 · 3 comments

Comments

@azanar
Copy link

azanar commented May 31, 2019

Use case: I am using the ankane/pghero docker image in a Kubernetes cluster.

I would like to be able to define a /app/config/pghero.yaml file as a Kubernetes resource, to be mounted into the container.

Limitation: Unfortunately, Kubernetes can only mount directories, which means masking the other contents of /app/config/. This includes /app/config/puma.rb:

/usr/local/bundle/gems/puma-3.12.0/lib/puma/dsl.rb:41:in `read': No such file or directory @ rb_sysopen - config/puma.rb (Errno::ENOENT)

Idea: It would be lovely to be able to provide an alternate path to locate pghero.yaml or be able to define it as an environmental variable. As an example declaration:

ENV['PGHERO_YML_FILE'] = '/mnt/pghero.yaml'

This would enable mounting a volume containing it wherever, and supporting this quirk of Kubernetes.

Happy to hear thoughts.

@ankane ankane closed this as completed in ff2dd6c May 31, 2019
@ankane
Copy link
Owner

ankane commented May 31, 2019

Thanks for the clear explanation @azanar. Going with ENV["PGHERO_CONFIG_PATH"] as proposed in #244.

@ankane
Copy link
Owner

ankane commented May 31, 2019

Just pushed a new version to Docker Hub under ankane/pghero:latest. Let me know how it works for you.

@azanar
Copy link
Author

azanar commented Jun 4, 2019

@ankane works great. thank you!

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

No branches or pull requests

2 participants