Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- docker exec -it <redis_container_name> redis-cli
- ping
- BROKER_URL = 'redis://localhost:6379/0'
- BROKER_TRANSPORT = 'redis'
- CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
- CELERY_ACCEPT_CONTENT = ['application/json']
- CELERY_TASK_SERIALIZER = 'json'
- CELERY_RESULT_SERIALIZER = 'json'
- CELERY_ENABLE_UTC = True
- CELERY_TIMEZONE = "UTC"
- redis:
- image: redis
- ports:
- - "6379:6379"
- BROKER_TRANSPORT = "redis"
- _REDIS_LOCATION = 'redis://{}:{}'.format(os.environ.get("REDIS_PORT_6379_TCP_ADDR"), os.environ.get("REDIS_PORT_6379_TCP_PORT"))
- BROKER_URL = _REDIS_LOCATION + "/0"
- CELERY_RESULT_BACKEND = _REDIS_LOCATION + "/1"
- CELERY_BROKER_URL = 'redis://cache:6379/0'
- CELERY_RESULT_BACKEND = 'redis://cache:6379/0'
- version: '2'
- services:
- web:
- container_name: django-container
- *******
- other options
- *******
- depends_on:
- - cache
- - db
- cache:
- container_name: redis-container
- restart: always
- image: redis:latest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement