Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. docker exec -it <redis_container_name> redis-cli
  2. ping
  3.  
  4. BROKER_URL = 'redis://localhost:6379/0'
  5. BROKER_TRANSPORT = 'redis'
  6. CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  7. CELERY_ACCEPT_CONTENT = ['application/json']
  8. CELERY_TASK_SERIALIZER = 'json'
  9. CELERY_RESULT_SERIALIZER = 'json'
  10. CELERY_ENABLE_UTC = True
  11. CELERY_TIMEZONE = "UTC"
  12.  
  13. redis:
  14. image: redis
  15. ports:
  16. - "6379:6379"
  17.  
  18. BROKER_TRANSPORT = "redis"
  19. _REDIS_LOCATION = 'redis://{}:{}'.format(os.environ.get("REDIS_PORT_6379_TCP_ADDR"), os.environ.get("REDIS_PORT_6379_TCP_PORT"))
  20. BROKER_URL = _REDIS_LOCATION + "/0"
  21. CELERY_RESULT_BACKEND = _REDIS_LOCATION + "/1"
  22.  
  23. CELERY_BROKER_URL = 'redis://cache:6379/0'
  24. CELERY_RESULT_BACKEND = 'redis://cache:6379/0'
  25.  
  26. version: '2'
  27. services:
  28. web:
  29. container_name: django-container
  30. *******
  31. other options
  32. *******
  33.  
  34. depends_on:
  35. - cache
  36. - db
  37.  
  38. cache:
  39. container_name: redis-container
  40. restart: always
  41. image: redis:latest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement