mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Disable redis image by default (#3416)
- Enable using the docker --profile command
This commit is contained in:
parent
74fbd30982
commit
ab654c3ae7
@ -34,10 +34,12 @@ INVENTREE_DB_PORT=5432
|
|||||||
#INVENTREE_DB_USER=pguser
|
#INVENTREE_DB_USER=pguser
|
||||||
#INVENTREE_DB_PASSWORD=pgpassword
|
#INVENTREE_DB_PASSWORD=pgpassword
|
||||||
|
|
||||||
# Redis cache setup
|
# 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
|
||||||
# Refer to settings.py for other cache options
|
# Refer to settings.py for other cache options
|
||||||
INVENTREE_CACHE_HOST=inventree-cache
|
#INVENTREE_CACHE_HOST=inventree-cache
|
||||||
INVENTREE_CACHE_PORT=6379
|
#INVENTREE_CACHE_PORT=6379
|
||||||
|
|
||||||
# Enable plugins?
|
# Enable plugins?
|
||||||
INVENTREE_PLUGINS_ENABLED=False
|
INVENTREE_PLUGINS_ENABLED=False
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
# Docker compose recipe for InvenTree production server, with the following containerized processes
|
# Docker compose recipe for a production-ready InvenTree setup, with the following containers:
|
||||||
# - PostgreSQL as the database backend
|
# - PostgreSQL as the database backend
|
||||||
# - gunicorn as the InvenTree web server
|
# - gunicorn as the InvenTree web server
|
||||||
# - django-q as the InvenTree background worker process
|
# - django-q as the InvenTree background worker process
|
||||||
# - nginx as a reverse proxy
|
# - nginx as a reverse proxy
|
||||||
# - redis as the cache manager
|
# - redis as the cache manager (optional, disabled by default)
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# READ BEFORE STARTING!
|
# READ BEFORE STARTING!
|
||||||
@ -18,10 +18,8 @@ version: "3.8"
|
|||||||
# Changes made to this file are reflected across all containers!
|
# Changes made to this file are reflected across all containers!
|
||||||
#
|
#
|
||||||
# IMPORTANT NOTE:
|
# IMPORTANT NOTE:
|
||||||
# You should not have to change *anything* within the docker-compose.yml file!
|
# You should not have to change *anything* within this docker-compose.yml file!
|
||||||
# Instead, make any changes in the .env file!
|
# Instead, make any changes in the .env file!
|
||||||
# The only *mandatory* change is to set the INVENTREE_EXT_VOLUME variable,
|
|
||||||
# which defines the directory (on your local machine) where persistent data are stored.
|
|
||||||
|
|
||||||
# ------------------------
|
# ------------------------
|
||||||
# InvenTree Image Versions
|
# InvenTree Image Versions
|
||||||
@ -29,15 +27,12 @@ version: "3.8"
|
|||||||
# By default, this docker-compose script targets the STABLE version of InvenTree,
|
# By default, this docker-compose script targets the STABLE version of InvenTree,
|
||||||
# image: inventree/inventree:stable
|
# image: inventree/inventree:stable
|
||||||
#
|
#
|
||||||
# To run the LATEST (development) version of InvenTree, change the target image to:
|
# To run the LATEST (development) version of InvenTree,
|
||||||
# image: inventree/inventree:latest
|
# change the INVENTREE_TAG variable (in the .env file) to "latest"
|
||||||
#
|
#
|
||||||
# Alternatively, you could target a specific tagged release version with (for example):
|
# Alternatively, you could target a specific tagged release version with (for example):
|
||||||
# image: inventree/inventree:0.5.3
|
# INVENTREE_TAG=0.7.5
|
||||||
#
|
#
|
||||||
# NOTE: If you change the target image, ensure it is the same for the following containers:
|
|
||||||
# - inventree-server
|
|
||||||
# - inventree-worker
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Database service
|
# Database service
|
||||||
@ -58,11 +53,14 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# redis acts as database cache manager
|
# redis acts as database cache manager
|
||||||
|
# only runs under the "redis" profile : https://docs.docker.com/compose/profiles/
|
||||||
inventree-cache:
|
inventree-cache:
|
||||||
container_name: inventree-cache
|
container_name: inventree-cache
|
||||||
image: redis:7.0
|
image: redis:7.0
|
||||||
depends_on:
|
depends_on:
|
||||||
- inventree-db
|
- inventree-db
|
||||||
|
profiles:
|
||||||
|
- redis
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
expose:
|
expose:
|
||||||
@ -79,7 +77,6 @@ services:
|
|||||||
- 8000
|
- 8000
|
||||||
depends_on:
|
depends_on:
|
||||||
- inventree-db
|
- inventree-db
|
||||||
- inventree-cache
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
Reference in New Issue
Block a user