title: Celery not work: Cannot connect to amqp://guest:**@127.0.0.1:5672//
body: <p>I can not run the celery worker + docker + django. I download image rabbit and linked worker, and at run I get error: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
  worker_1. Django: 1.11, calary: 4.1.0. What doing wrong?</p>
  
  <p>docker-compose</p>
  
  <pre><code>rabbit:
    image: rabbitmq:latest
    ports:
      - "5672:5672"
  
  worker:
    build: ./project
    volumes:
      - ./main:/src/app
    depends_on:
      - rabbit
    links:
      - web #django project
    entrypoint: /src/app/calery.sh
  </code></pre>
  
  <p>calery </p>
  
  <pre><code>from __future__ import absolute_import, unicode_literals
  import os
  from celery import Celery
  
  os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')
  
  app = Celery('app')
  
  app.config_from_object('django.conf:settings', namespace='APP')
  
  app.autodiscover_tasks()
  
  @app.task(bind=True)
  def add():
     print('Task')
  </code></pre>
  
  <p>celery.sh</p>
  
  <pre><code>#!/bin/bash
  
  cd app
  celery -A app worker -l info
  </code></pre>