From 63f1e58ca94e99999835b6ef271c7ba6b4a92414 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 11 Jun 2022 19:58:36 +1000 Subject: [PATCH] Fix container priority for docker compose recipe (#3180) - Cache must be running *before* the server - Server must be running *before* the worker --- docker/production/docker-compose.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docker/production/docker-compose.yml b/docker/production/docker-compose.yml index 7308e82b91..092e62f510 100644 --- a/docker/production/docker-compose.yml +++ b/docker/production/docker-compose.yml @@ -57,6 +57,18 @@ services: - inventree_data:/var/lib/postgresql/data/ restart: unless-stopped + # redis acts as database cache manager + inventree-cache: + container_name: inventree-cache + image: redis:7.0 + depends_on: + - inventree-db + env_file: + - .env + ports: + - ${INVENTREE_CACHE_PORT:-6379}:6379 + restart: unless-stopped + # InvenTree web server services # Uses gunicorn as the web server inventree-server: @@ -67,6 +79,7 @@ services: - 8000 depends_on: - inventree-db + - inventree-cache env_file: - .env volumes: @@ -81,7 +94,6 @@ services: image: inventree/inventree:stable command: invoke worker depends_on: - - inventree-db - inventree-server env_file: - .env @@ -113,18 +125,6 @@ services: - inventree_data:/var/www restart: unless-stopped - # redis acts as database cache manager - inventree-cache: - container_name: inventree-cache - image: redis:7.0 - depends_on: - - inventree-db - env_file: - - .env - ports: - - ${INVENTREE_CACHE_PORT:-6379}:6379 - restart: unless-stopped - volumes: # NOTE: Change /path/to/data to a directory on your local machine # Persistent data, stored external to the container(s)