docker-compose.middleware.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. version: '3'
  2. services:
  3. # The postgres database.
  4. db:
  5. image: postgres:15-alpine
  6. restart: always
  7. environment:
  8. # The password for the default postgres user.
  9. POSTGRES_PASSWORD: difyai123456
  10. # The name of the default postgres database.
  11. POSTGRES_DB: dify
  12. # postgres data directory
  13. PGDATA: /var/lib/postgresql/data/pgdata
  14. volumes:
  15. - ./volumes/db/data:/var/lib/postgresql/data
  16. ports:
  17. - "5432:5432"
  18. # The redis cache.
  19. redis:
  20. image: redis:6-alpine
  21. restart: always
  22. volumes:
  23. # Mount the redis data directory to the container.
  24. - ./volumes/redis/data:/data
  25. # Set the redis password when startup redis server.
  26. command: redis-server --requirepass difyai123456
  27. ports:
  28. - "6379:6379"
  29. # The Weaviate vector store.
  30. weaviate:
  31. image: semitechnologies/weaviate:1.19.0
  32. restart: always
  33. volumes:
  34. # Mount the Weaviate data directory to the container.
  35. - ./volumes/weaviate:/var/lib/weaviate
  36. environment:
  37. # The Weaviate configurations
  38. # You can refer to the [Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars) documentation for more information.
  39. QUERY_DEFAULTS_LIMIT: 25
  40. AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'false'
  41. PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
  42. DEFAULT_VECTORIZER_MODULE: 'none'
  43. CLUSTER_HOSTNAME: 'node1'
  44. AUTHENTICATION_APIKEY_ENABLED: 'true'
  45. AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih'
  46. AUTHENTICATION_APIKEY_USERS: 'hello@dify.ai'
  47. AUTHORIZATION_ADMINLIST_ENABLED: 'true'
  48. AUTHORIZATION_ADMINLIST_USERS: 'hello@dify.ai'
  49. ports:
  50. - "8080:8080"
  51. # The DifySandbox
  52. sandbox:
  53. image: langgenius/dify-sandbox:latest
  54. restart: always
  55. cap_add:
  56. - SYS_ADMIN
  57. environment:
  58. # The DifySandbox configurations
  59. API_KEY: dify-sandbox
  60. GIN_MODE: 'release'
  61. WORKER_TIMEOUT: 15
  62. ports:
  63. - "8194:8194"
  64. # Qdrant vector store.
  65. # uncomment to use qdrant as vector store.
  66. # (if uncommented, you need to comment out the weaviate service above,
  67. # and set VECTOR_STORE to qdrant in the api & worker service.)
  68. # qdrant:
  69. # image: qdrant/qdrant:1.7.3
  70. # restart: always
  71. # volumes:
  72. # - ./volumes/qdrant:/qdrant/storage
  73. # environment:
  74. # QDRANT_API_KEY: 'difyai123456'
  75. # ports:
  76. # - "6333:6333"