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

Remove uninterpreted environment variable from docker-compose.yml #69

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

jsma
Copy link
Contributor

@jsma jsma commented Nov 10, 2023

This caused a spurious warning when running docker compose commands because $PYTHONPATH is not defined on the docker host and docker attempted to interpret it as if it were any other environment variable e.g. $DB_USER, etc.

All it accomplished was to add a non-existent directory to the path:

docker compose run web bash
root@2bc54a69fd5c:/code/bakerydemo# echo $PYTHONPATH
/code/wagtail:/code/bakerydemo:$PYTHONPATH

root@2bc54a69fd5c:/code/bakerydemo# python -c "import sys; print('\n'.join(sys.path))"

/code/wagtail
/code/bakerydemo
/code/bakerydemo/$PYTHONPATH
/usr/local/lib/python38.zip
/usr/local/lib/python3.8
/usr/local/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/site-packages
/code/willow

Fixes #56

This caused a spurious warning when running `docker compose` commands because `$PYTHONPATH` is not defined on the docker _host_ and docker attempted to interpret it as if it were any other environment variable e.g. `$DB_USER`, etc.

All it accomplished was to add a non-existent directory to the path:

```bash
docker compose run web bash
root@2bc54a69fd5c:/code/bakerydemo# echo $PYTHONPATH
/code/wagtail:/code/bakerydemo:$PYTHONPATH

root@2bc54a69fd5c:/code/bakerydemo# python -c "import sys; print('\n'.join(sys.path))"

/code/wagtail
/code/bakerydemo
/code/bakerydemo/$PYTHONPATH
/usr/local/lib/python38.zip
/usr/local/lib/python3.8
/usr/local/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/site-packages
/code/willow
```

Fixes wagtail#56
@jsma jsma mentioned this pull request Nov 11, 2023
@saevarom
Copy link
Collaborator

Thank you @jsma !

@saevarom saevarom merged commit 0d4b9c6 into wagtail:main Nov 11, 2023
1 check passed
@lb-
Copy link
Member

lb- commented Nov 11, 2023

Thank you

@jsma jsma deleted the fix-56 branch November 11, 2023 22:48
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.

Set PYTHONPATH variable
3 participants