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

environment variables? #8

Closed
ackvf opened this issue Feb 21, 2018 · 3 comments
Closed

environment variables? #8

ackvf opened this issue Feb 21, 2018 · 3 comments

Comments

@ackvf
Copy link

ackvf commented Feb 21, 2018

Hello, is there a documentation for which env variables does heroku pass to the docker and to the app?

I need to access latest commit hash in the app.

@dmathieu
Copy link

We pass exactly the same environment variables to slugs and docker apps.
That means you can get access to the commit hash with the dyno-metadata feature: https://devcenter.heroku.com/articles/dyno-metadata

@ackvf
Copy link
Author

ackvf commented Feb 22, 2018

Thank you for your answer, I did manage to get HEROKU_ variables in the env, however, the HEROKU_SLUG_COMMIT is empty. I guess it is not unexpected since I did not build from git push, but as you can see, the commit seems to be available in the scope under npm_package_gitHead, therefore I would expect in HEROKU_SLUG_COMMIT as well. Are my thoughts correct?
For reference.

@dmathieu
Copy link

This is because the docker push API doesn't allow us to provide any information such as a commit sha.
We cannot make the data available today unfortunately.

diranetafen added a commit to diranetafen/alpinehelloworld that referenced this issue Dec 18, 2023
…ailed

heroku#8 [4/7] RUN pip3 install --no-cache-dir -q -r /tmp/requirements.txt
heroku#8 2.007 error: externally-managed-environment
heroku#8 2.007 
heroku#8 2.007 �� This environment is externally managed
heroku#8 2.007 ������> 
heroku#8 2.007     The system-wide python installation should be maintained using the system
heroku#8 2.007     package manager (apk) only.
heroku#8 2.007     
heroku#8 2.007     If the package in question is not packaged already (and hence installable via
heroku#8 2.007     "apk add py3-somepackage"), please consider installing it inside a virtual
heroku#8 2.007     environment, e.g.:
heroku#8 2.007     
heroku#8 2.007     python3 -m venv /path/to/venv
heroku#8 2.007     . /path/to/venv/bin/activate
heroku#8 2.007     pip install mypackage
heroku#8 2.007     
heroku#8 2.007     To exit the virtual environment, run:
heroku#8 2.007     
heroku#8 2.007     deactivate
heroku#8 2.007     
heroku#8 2.007     The virtual environment is not deleted, and can be re-entered by re-sourcing
heroku#8 2.007     the activate file.
heroku#8 2.007     
heroku#8 2.007     To automatically manage virtual environments, consider using pipx (from the
heroku#8 2.007     pipx package).
heroku#8 2.007 
heroku#8 2.007 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
heroku#8 2.007 hint: See PEP 668 for the detailed specification.
heroku#8 ERROR: process "/bin/sh -c pip3 install --no-cache-dir -q -r /tmp/requirements.txt" did not complete successfully: exit code: 1
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