docker-compose.middleware.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. version: '3.1'
  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. - ./volumes/db/scripts:/docker-entrypoint-initdb.d/
  17. ports:
  18. - "5432:5432"
  19. # The redis cache.
  20. redis:
  21. image: redis:6-alpine
  22. restart: always
  23. volumes:
  24. # Mount the redis data directory to the container.
  25. - ./volumes/redis/data:/data
  26. # Set the redis password when startup redis server.
  27. command: redis-server --requirepass difyai123456
  28. ports:
  29. - "6379:6379"
  30. # The Weaviate vector store.
  31. weaviate:
  32. image: semitechnologies/weaviate:1.18.4
  33. restart: always
  34. volumes:
  35. # Mount the Weaviate data directory to the container.
  36. - ./volumes/weaviate:/var/lib/weaviate
  37. environment:
  38. # The Weaviate configurations
  39. # You can refer to the [Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars) documentation for more information.
  40. QUERY_DEFAULTS_LIMIT: 25
  41. AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'false'
  42. PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
  43. DEFAULT_VECTORIZER_MODULE: 'none'
  44. CLUSTER_HOSTNAME: 'node1'
  45. AUTHENTICATION_APIKEY_ENABLED: 'true'
  46. AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih'
  47. AUTHENTICATION_APIKEY_USERS: 'hello@dify.ai'
  48. AUTHORIZATION_ADMINLIST_ENABLED: 'true'
  49. AUTHORIZATION_ADMINLIST_USERS: 'hello@dify.ai'
  50. ports:
  51. - "8080:8080"