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_DB=fedireads
POSTGRES_HOST=db POSTGRES_HOST=db
CELERY_BROKER=redis://redis:6379/0 # Redis activity stream manager
CELERY_RESULT_BACKEND=redis://redis:6379/0 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_HOST="smtp.mailgun.org"
EMAIL_PORT=587 EMAIL_PORT=587

View file

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

View file

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