Friday, 17 January 2025

BashProfile Export Variable and Python WSGI docker issue

 https://stackoverflow.com/questions/51789509/bash-profile-variables

.bash_profile exported variable


can be shown by echo $MYVAR

if you have

export MYVAR=xxxx

in bash_profile


however, it only works in interactive shell, so broken pipe, new shell, need to call source .bash_profile again


you can verify that before source echo $MYVAR is empty and after source .bash_profile they have value.



Then if your docker-compose.yml django app:

  app:

                                user: "${uID}:${gID}"

they will fail on new shell cause uID and gID is empty

No comments:

Post a Comment