mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Adds redis support to production docker-compose (#3171)
* Adds a redis container to the production docker-compose script * Fix ports
This commit is contained in:
parent
79f498a648
commit
d9efe27f8a
@ -34,6 +34,11 @@ INVENTREE_DB_PORT=5432
|
|||||||
#INVENTREE_DB_USER=pguser
|
#INVENTREE_DB_USER=pguser
|
||||||
#INVENTREE_DB_PASSWORD=pgpassword
|
#INVENTREE_DB_PASSWORD=pgpassword
|
||||||
|
|
||||||
|
# Redis cache setup
|
||||||
|
# Refer to settings.py for other cache options
|
||||||
|
INVENTREE_CACHE_HOST=inventree-cache
|
||||||
|
INVENTREE_CACHE_PORT=6379
|
||||||
|
|
||||||
# Enable plugins?
|
# Enable plugins?
|
||||||
INVENTREE_PLUGINS_ENABLED=False
|
INVENTREE_PLUGINS_ENABLED=False
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
# Docker compose recipe for InvenTree production server
|
# Docker compose recipe for InvenTree production server, with the following containerized processes
|
||||||
# - 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
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# READ BEFORE STARTING!
|
# READ BEFORE STARTING!
|
||||||
@ -112,6 +113,18 @@ services:
|
|||||||
- inventree_data:/var/www
|
- inventree_data:/var/www
|
||||||
restart: unless-stopped
|
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:
|
volumes:
|
||||||
# NOTE: Change /path/to/data to a directory on your local machine
|
# NOTE: Change /path/to/data to a directory on your local machine
|
||||||
# Persistent data, stored external to the container(s)
|
# Persistent data, stored external to the container(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user