From 33a686ace8860d146fd7fbfb37b1903b04902bb5 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 17 Nov 2024 00:14:30 +1100 Subject: [PATCH] Enable redis by default for docker setup (#8501) * Enable redis by default for docker setup * Bring cache up before server --- contrib/container/.env | 10 ++++------ contrib/container/docker-compose.yml | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/container/.env b/contrib/container/.env index a180d82dc2..7124be1938 100644 --- a/contrib/container/.env +++ b/contrib/container/.env @@ -24,13 +24,11 @@ INVENTREE_DB_PORT=5432 INVENTREE_DB_USER=pguser INVENTREE_DB_PASSWORD=pgpassword -# Redis cache setup (disabled by default) -# Un-comment the following lines to enable Redis cache -# Note that you will also have to run docker-compose with the --profile redis command +# Redis cache setup # Refer to settings.py for other cache options -#INVENTREE_CACHE_ENABLED=True -#INVENTREE_CACHE_HOST=inventree-cache -#INVENTREE_CACHE_PORT=6379 +INVENTREE_CACHE_ENABLED=True +INVENTREE_CACHE_HOST=inventree-cache +INVENTREE_CACHE_PORT=6379 # Options for gunicorn server INVENTREE_GUNICORN_TIMEOUT=90 diff --git a/contrib/container/docker-compose.yml b/contrib/container/docker-compose.yml index 6a0b001f8b..9a7a00927f 100644 --- a/contrib/container/docker-compose.yml +++ b/contrib/container/docker-compose.yml @@ -71,6 +71,7 @@ services: - 8000 depends_on: - inventree-db + - inventree-cache env_file: - .env volumes: