Enable caching with Redis

This commit is contained in:
Adam Goldsmith 2023-03-30 01:41:18 -04:00
parent 6287003d1a
commit 49c294705f

View File

@ -12,6 +12,13 @@ services:
- db:/var/lib/postgresql/data/ - db:/var/lib/postgresql/data/
restart: unless-stopped restart: unless-stopped
inventree-cache:
container_name: inventree-cache
image: redis:7.0
depends_on:
- inventree-db
restart: unless-stopped
inventree-server: inventree-server:
container_name: inventree-server container_name: inventree-server
build: ./inventree-ldap build: ./inventree-ldap
@ -34,6 +41,9 @@ services:
INVENTREE_DB_NAME: "${POSTGRES_DB}" INVENTREE_DB_NAME: "${POSTGRES_DB}"
INVENTREE_DB_USER: "${POSTGRES_USER}" INVENTREE_DB_USER: "${POSTGRES_USER}"
INVENTREE_DB_PASSWORD: "${POSTGRES_PASSWORD}" INVENTREE_DB_PASSWORD: "${POSTGRES_PASSWORD}"
INVENTREE_CACHE_HOST: inventree-cache
INVENTREE_CACHE_PORT: 6379
restart: unless-stopped restart: unless-stopped
# Background worker process handles long-running or periodic tasks # Background worker process handles long-running or periodic tasks