Skip to content

Commit

Permalink
Remove uninterpreted environment variable from docker-compose.yml
Browse files Browse the repository at this point in the history
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 #56
  • Loading branch information
jsma authored and saevarom committed Nov 11, 2023
1 parent 9479945 commit 0d4b9c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- "8000:8000"
environment:
DATABASE_URL: "postgres://wagtail:changeme@db/wagtail"
PYTHONPATH: "/code/wagtail:/code/bakerydemo:$PYTHONPATH"
PYTHONPATH: "/code/wagtail:/code/bakerydemo"
depends_on:
- db
- frontend
Expand Down

0 comments on commit 0d4b9c6

Please sign in to comment.