Adds redis image for activity streams

This commit is contained in:
Mouse Reeve 2021-03-22 10:44:42 -07:00
parent 1025a2e4da
commit ebc01362e6
3 changed files with 22 additions and 5 deletions

View file

@ -22,8 +22,13 @@ POSTGRES_USER=fedireads
POSTGRES_DB=fedireads
POSTGRES_HOST=db
CELERY_BROKER=redis://redis:6379/0
CELERY_RESULT_BACKEND=redis://redis:6379/0
# Redis activity stream manager
REDIS_ACTIVITY_HOST=redis_activity
REDIS_ACTIVITY_PORT=6379
# Celery config with redis broker
CELERY_BROKER=redis://redis_broker:6379/0
CELERY_RESULT_BACKEND=redis://redis_broker:6379/0
EMAIL_HOST="smtp.mailgun.org"
EMAIL_PORT=587

View file

@ -92,6 +92,9 @@ TEMPLATES = [
WSGI_APPLICATION = "bookwyrm.wsgi.application"
# redis
REDIS_ACTIVITY_HOST = env("REDIS_ACTIVITY_HOST", "localhost")
REDIS_ACTIVITY_PORT = env("REDIS_ACTIVITY_PORT", 6379)
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

View file

@ -31,11 +31,20 @@ services:
depends_on:
- db
- celery_worker
- redis_activity
networks:
- main
ports:
- 8000:8000
redis:
redis_activity:
image: redis
env_file: .env
ports:
- 6378:6378
networks:
- main
restart: on-failure
redis_broker:
image: redis
env_file: .env
ports:
@ -55,7 +64,7 @@ services:
- media_volume:/app/images
depends_on:
- db
- redis
- redis_broker
restart: on-failure
flower:
build: .
@ -67,7 +76,7 @@ services:
- main
depends_on:
- db
- redis
- redis_broker
restart: on-failure
ports:
- 8888:8888