mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-04-24 06:39:45 +08:00
feat:Add host volume env variables for postgres, redis and weaviate (#9761)
This commit is contained in:
parent
57ec12eb6b
commit
169f7440ac
@ -16,7 +16,7 @@ services:
|
|||||||
-c 'maintenance_work_mem=${POSTGRES_MAINTENANCE_WORK_MEM:-64MB}'
|
-c 'maintenance_work_mem=${POSTGRES_MAINTENANCE_WORK_MEM:-64MB}'
|
||||||
-c 'effective_cache_size=${POSTGRES_EFFECTIVE_CACHE_SIZE:-4096MB}'
|
-c 'effective_cache_size=${POSTGRES_EFFECTIVE_CACHE_SIZE:-4096MB}'
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/db/data:/var/lib/postgresql/data
|
- ${PGDATA_HOST_VOLUME:-./volumes/db/data}:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- "${EXPOSE_POSTGRES_PORT:-5432}:5432"
|
- "${EXPOSE_POSTGRES_PORT:-5432}:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -31,7 +31,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
# Mount the redis data directory to the container.
|
# Mount the redis data directory to the container.
|
||||||
- ./volumes/redis/data:/data
|
- ${REDIS_HOST_VOLUME:-./volumes/redis/data}:/data
|
||||||
# Set the redis password when startup redis server.
|
# Set the redis password when startup redis server.
|
||||||
command: redis-server --requirepass difyai123456
|
command: redis-server --requirepass difyai123456
|
||||||
ports:
|
ports:
|
||||||
@ -94,7 +94,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
# Mount the Weaviate data directory to the container.
|
# Mount the Weaviate data directory to the container.
|
||||||
- ./volumes/weaviate:/var/lib/weaviate
|
- ${WEAVIATE_HOST_VOLUME:-./volumes/weaviate}:/var/lib/weaviate
|
||||||
env_file:
|
env_file:
|
||||||
- ./middleware.env
|
- ./middleware.env
|
||||||
environment:
|
environment:
|
||||||
|
@ -8,6 +8,7 @@ POSTGRES_PASSWORD=difyai123456
|
|||||||
POSTGRES_DB=dify
|
POSTGRES_DB=dify
|
||||||
# postgres data directory
|
# postgres data directory
|
||||||
PGDATA=/var/lib/postgresql/data/pgdata
|
PGDATA=/var/lib/postgresql/data/pgdata
|
||||||
|
PGDATA_HOST_VOLUME=./volumes/db/data
|
||||||
|
|
||||||
# Maximum number of connections to the database
|
# Maximum number of connections to the database
|
||||||
# Default is 100
|
# Default is 100
|
||||||
@ -39,6 +40,11 @@ POSTGRES_MAINTENANCE_WORK_MEM=64MB
|
|||||||
# Reference: https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE
|
# Reference: https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE
|
||||||
POSTGRES_EFFECTIVE_CACHE_SIZE=4096MB
|
POSTGRES_EFFECTIVE_CACHE_SIZE=4096MB
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Environment Variables for redis Service
|
||||||
|
REDIS_HOST_VOLUME=./volumes/redis/data
|
||||||
|
# -----------------------------
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# Environment Variables for sandbox Service
|
# Environment Variables for sandbox Service
|
||||||
SANDBOX_API_KEY=dify-sandbox
|
SANDBOX_API_KEY=dify-sandbox
|
||||||
@ -70,6 +76,7 @@ WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
|
|||||||
WEAVIATE_AUTHENTICATION_APIKEY_USERS=hello@dify.ai
|
WEAVIATE_AUTHENTICATION_APIKEY_USERS=hello@dify.ai
|
||||||
WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED=true
|
WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED=true
|
||||||
WEAVIATE_AUTHORIZATION_ADMINLIST_USERS=hello@dify.ai
|
WEAVIATE_AUTHORIZATION_ADMINLIST_USERS=hello@dify.ai
|
||||||
|
WEAVIATE_HOST_VOLUME=./volumes/weaviate
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# Docker Compose Service Expose Host Port Configurations
|
# Docker Compose Service Expose Host Port Configurations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user