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

Feature/dump server env #552

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

Conversation

alainchiasson-guavus
Copy link

I found this useful for trouble shooting horizontal scaling issues/load balancing . It prints out the ENVIRONMENT variables that are set on the server.

curl http://127.0.0.1/env

{
  "GUNICORN_CMD_ARGS":"--capture-output --error-logfile - --access-logfile - --access-logformat '%(h)s %(t)s %(r)s %(s)s Host: %({Host}i)s}'",
  "HOME":"/root",
  "HOSTNAME":"27dd06166bc7",
  "PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  "SERVER_SOFTWARE":"gunicorn/19.9.0",
  "TAG":"'production'"
}

Not sure if it fits with the goals of httpbin.

@alainchiasson-guavus
Copy link
Author

Rebuilding locally and will fix.

@simonkowallik
Copy link

I had a similar use-case and previously submitted #543 which prints the hostname and server ip address. I thought about moving to environment variables as well, as defining env variables is straight forward in contrast to container hostname + ip address.

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