docker-compose.middleware.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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:0.1.0
  54. restart: always
  55. cap_add:
  56. # Why is sys_admin permission needed?
  57. # https://docs.dify.ai/getting-started/install-self-hosted/install-faq#id-16.-why-is-sys_admin-permission-needed
  58. - SYS_ADMIN
  59. environment:
  60. # The DifySandbox configurations
  61. API_KEY: dify-sandbox
  62. GIN_MODE: 'release'
  63. WORKER_TIMEOUT: 15
  64. ports:
  65. - "8194:8194"
  66. # Qdrant vector store.
  67. # uncomment to use qdrant as vector store.
  68. # (if uncommented, you need to comment out the weaviate service above,
  69. # and set VECTOR_STORE to qdrant in the api & worker service.)
  70. # qdrant:
  71. # image: qdrant/qdrant:1.7.3
  72. # restart: always
  73. # volumes:
  74. # - ./volumes/qdrant:/qdrant/storage
  75. # environment:
  76. # QDRANT_API_KEY: 'difyai123456'
  77. # ports:
  78. # - "6333:6333"
  79. # - "6334:6334"