vintasoftware / django-react-boilerplate

Django 5, React, Bootstrap 5 with Python 3 and Webpack project boilerplate
MIT License
1.97k stars 479 forks source link

Issue with celery container when using Docker #552

Closed jmwenda closed 1 year ago

jmwenda commented 3 years ago

Describe the bug Having issues getting the celery container to run. I get the error

celery_1 | python: can't open file 'manage.py': [Errno 2] No such file or directory To Reproduce This is on a fresh set up following instructions. I have tried pruning the images, volumes and container and started fresh but still keep having the celery not starting up.

ben256 commented 2 years ago

I had the same issue, to fix it I slightly changed the celery section of the docker compose file:

celery:
    build:
      dockerfile: backend/Dockerfile
      context: .
    command: python manage.py celery
    env_file: backend/.env
    volumes:
      - ./:/home/user/app/
    depends_on:
      - db
      - broker
      - result

I'm not sure what effect this will have on anything else, but I haven't run into any other issues just yet.

hugobessa commented 1 year ago

The celery setup on docker-compose.yml seems broken indeed. I've opened a PR with the suggested fix from @ben256