Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
In VPN mode instead of exporting environment variables write them into a .env file #608
This way they can be loaded by the IDE for debugging.
Currently the IDE used for debugger (like PyCharm) is running in is own context and is not aware of the environment variables set by telepresence in the shell. But if these were written into a file they can easily be loaded by python into the correct environment.
my workaround is to create a shell script to get the env and write it into a file.
sed -i 's|TELEPRESENCE_ROOT.*|TELEPRESENCE_ROOT='"$TELEPRESENCE_ROOT"'|' ./app/.env
If we give Telepresence the ability to output an env file, eventually we'll need to decide which variant we generate. Here are a few options:
Generating JSON avoids these concerns, but might not be as broadly useful.