4đź‘Ť
âś…
That’s because in your docker-compose.yml
file you’re creating an image called web with a shared volume which maps your current directory (.) to /code directory of the created container.
volumes:
- .:/code
That means that all files that are in /code directory (the directory where you create your project inside in the container) will be also in your local system under project directory.
Take a look to data volumes in Docker documentation to see things clearly:
👤kstromeiraos
1đź‘Ť
Because in the docker-compose.yml it’s defined a volume:
volumes: - .:/code
The “dot” before the colon means the current directory in your computer (host) relative to the Dockerfile and docker-compose.yml. And the /code is the directory inside the container.
👤wcomnisky
- [Django]-Nginx/gunicorn connection hanging for 60 seconds
- [Django]-Django – download file without reloading the page
- [Django]-Django multiple contexts within a single view
- [Django]-Django and Apache Issue
Source:stackexchange.com