docker-compose.yml contains:
version: "3.9"
services:
build: .
web:
ports:
- "8000:8000"
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
It looks like everything after service: should be indented. Also, the service name should be before the build: . instruction. And it is best practice to use an array for the command when spaces are involved.
Try
version: "3.9"
services:
web:
build: .
ports:
- "8000:8000"
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
volumes:
- .:/code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With