Environment variables in direct SSH
Is there a way to access environment variables defined in the web app in an SSH connection over exposed TCP port?
5 Replies
Problem is each time a user logs in via SSH they get a new enviorment. So you wouldn't be looking at the environment with the details you want.
Yeah, but maybe they get saved somewhere on the pod? As a workaround I was thinking about adding an export of the vars to .bashrc in the startup script, but it seems to be a dirty hack
Are you using your own image or someone else's? If you have access to modify your code you could have it call a start.sh script on startup and from there you could do whatever you wanted with the ENV variables.
I'm using my own image, so I'm free to do that but was wondering if there already is a built-in solution for that. Anyway, thanks for your help!
unfortunately, I am not aware of such a pre-built solution. Good luck!