Reputation: 509
I am tried setting up django using docker but I am getting this error.
I have set up my Dockerfile and the docker-compose.yml.
docker-compose.yml
version: "3"
services:
db:
image: postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
Dockerfile
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /code/
This is the error I am getting.
Watching for file changes with StatReloader
web_1 | Exception in thread django-main-thread:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
Upvotes: 0
Views: 718
Reputation: 3501
I think This particular error was fixed in django 2.1
You'll want to upgrade your requirements to be django>=2.1 to ensure you get this new version.
The comments on the commit indicate that this patch will not be backported to django 1.11.x which does not support python3
after change django version re-ran docker-compose build.
Per the FAQ, Django 1.11.x is not compatible with Python 3
Django 1.11.x reached end of mainstream support on December 2, 2017 and it receives only data loss and security fixes until its end of life.
Upvotes: 1