docker-compose.yaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. version: '3'
  2. services:
  3. # API service
  4. api:
  5. image: langgenius/dify-api:0.6.11
  6. restart: always
  7. environment:
  8. # Startup mode, 'api' starts the API server.
  9. MODE: api
  10. # The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
  11. LOG_LEVEL: INFO
  12. # enable DEBUG mode to output more logs
  13. # DEBUG : true
  14. # A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`.
  15. SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U
  16. # The base URL of console application web frontend, refers to the Console base URL of WEB service if console domain is
  17. # different from api or web app domain.
  18. # example: http://cloud.dify.ai
  19. CONSOLE_WEB_URL: ''
  20. # Password for admin user initialization.
  21. # If left unset, admin user will not be prompted for a password when creating the initial admin account.
  22. INIT_PASSWORD: ''
  23. # The base URL of console application api server, refers to the Console base URL of WEB service if console domain is
  24. # different from api or web app domain.
  25. # example: http://cloud.dify.ai
  26. CONSOLE_API_URL: ''
  27. # The URL prefix for Service API endpoints, refers to the base URL of the current API service if api domain is
  28. # different from console domain.
  29. # example: http://api.dify.ai
  30. SERVICE_API_URL: ''
  31. # The URL prefix for Web APP frontend, refers to the Web App base URL of WEB service if web app domain is different from
  32. # console or api domain.
  33. # example: http://udify.app
  34. APP_WEB_URL: ''
  35. # File preview or download Url prefix.
  36. # used to display File preview or download Url to the front-end or as Multi-model inputs;
  37. # Url is signed and has expiration time.
  38. FILES_URL: ''
  39. # File Access Time specifies a time interval in seconds for the file to be accessed.
  40. # The default value is 300 seconds.
  41. FILES_ACCESS_TIMEOUT: 300
  42. # When enabled, migrations will be executed prior to application startup and the application will start after the migrations have completed.
  43. MIGRATION_ENABLED: 'true'
  44. # The configurations of postgres database connection.
  45. # It is consistent with the configuration in the 'db' service below.
  46. DB_USERNAME: postgres
  47. DB_PASSWORD: difyai123456
  48. DB_HOST: db
  49. DB_PORT: 5432
  50. DB_DATABASE: dify
  51. # The configurations of redis connection.
  52. # It is consistent with the configuration in the 'redis' service below.
  53. REDIS_HOST: redis
  54. REDIS_PORT: 6379
  55. REDIS_USERNAME: ''
  56. REDIS_PASSWORD: difyai123456
  57. REDIS_USE_SSL: 'false'
  58. # use redis db 0 for redis cache
  59. REDIS_DB: 0
  60. # The configurations of celery broker.
  61. # Use redis as the broker, and redis db 1 for celery broker.
  62. CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1
  63. # Specifies the allowed origins for cross-origin requests to the Web API, e.g. https://dify.app or * for all origins.
  64. WEB_API_CORS_ALLOW_ORIGINS: '*'
  65. # Specifies the allowed origins for cross-origin requests to the console API, e.g. https://cloud.dify.ai or * for all origins.
  66. CONSOLE_CORS_ALLOW_ORIGINS: '*'
  67. # CSRF Cookie settings
  68. # Controls whether a cookie is sent with cross-site requests,
  69. # providing some protection against cross-site request forgery attacks
  70. #
  71. # Default: `SameSite=Lax, Secure=false, HttpOnly=true`
  72. # This default configuration supports same-origin requests using either HTTP or HTTPS,
  73. # but does not support cross-origin requests. It is suitable for local debugging purposes.
  74. #
  75. # If you want to enable cross-origin support,
  76. # you must use the HTTPS protocol and set the configuration to `SameSite=None, Secure=true, HttpOnly=true`.
  77. #
  78. # The type of storage to use for storing user files. Supported values are `local` and `s3` and `azure-blob` and `google-storage`, Default: `local`
  79. STORAGE_TYPE: local
  80. # The path to the local storage directory, the directory relative the root path of API service codes or absolute path. Default: `storage` or `/home/john/storage`.
  81. # only available when STORAGE_TYPE is `local`.
  82. STORAGE_LOCAL_PATH: storage
  83. # The S3 storage configurations, only available when STORAGE_TYPE is `s3`.
  84. S3_USE_AWS_MANAGED_IAM: 'false'
  85. S3_ENDPOINT: 'https://xxx.r2.cloudflarestorage.com'
  86. S3_BUCKET_NAME: 'difyai'
  87. S3_ACCESS_KEY: 'ak-difyai'
  88. S3_SECRET_KEY: 'sk-difyai'
  89. S3_REGION: 'us-east-1'
  90. # The Azure Blob storage configurations, only available when STORAGE_TYPE is `azure-blob`.
  91. AZURE_BLOB_ACCOUNT_NAME: 'difyai'
  92. AZURE_BLOB_ACCOUNT_KEY: 'difyai'
  93. AZURE_BLOB_CONTAINER_NAME: 'difyai-container'
  94. AZURE_BLOB_ACCOUNT_URL: 'https://<your_account_name>.blob.core.windows.net'
  95. # The Google storage configurations, only available when STORAGE_TYPE is `google-storage`.
  96. GOOGLE_STORAGE_BUCKET_NAME: 'yout-bucket-name'
  97. # if you want to use Application Default Credentials, you can leave GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64 empty.
  98. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: 'your-google-service-account-json-base64-string'
  99. # The type of vector store to use. Supported values are `weaviate`, `qdrant`, `milvus`, `relyt`.
  100. VECTOR_STORE: weaviate
  101. # The Weaviate endpoint URL. Only available when VECTOR_STORE is `weaviate`.
  102. WEAVIATE_ENDPOINT: http://weaviate:8080
  103. # The Weaviate API key.
  104. WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  105. # The Qdrant endpoint URL. Only available when VECTOR_STORE is `qdrant`.
  106. QDRANT_URL: http://qdrant:6333
  107. # The Qdrant API key.
  108. QDRANT_API_KEY: difyai123456
  109. # The Qdrant client timeout setting.
  110. QDRANT_CLIENT_TIMEOUT: 20
  111. # The Qdrant client enable gRPC mode.
  112. QDRANT_GRPC_ENABLED: 'false'
  113. # The Qdrant server gRPC mode PORT.
  114. QDRANT_GRPC_PORT: 6334
  115. # Milvus configuration Only available when VECTOR_STORE is `milvus`.
  116. # The milvus host.
  117. MILVUS_HOST: 127.0.0.1
  118. # The milvus host.
  119. MILVUS_PORT: 19530
  120. # The milvus username.
  121. MILVUS_USER: root
  122. # The milvus password.
  123. MILVUS_PASSWORD: Milvus
  124. # The milvus tls switch.
  125. MILVUS_SECURE: 'false'
  126. # relyt configurations
  127. RELYT_HOST: db
  128. RELYT_PORT: 5432
  129. RELYT_USER: postgres
  130. RELYT_PASSWORD: difyai123456
  131. RELYT_DATABASE: postgres
  132. # pgvector configurations
  133. PGVECTOR_HOST: pgvector
  134. PGVECTOR_PORT: 5432
  135. PGVECTOR_USER: postgres
  136. PGVECTOR_PASSWORD: difyai123456
  137. PGVECTOR_DATABASE: dify
  138. # tidb vector configurations
  139. TIDB_VECTOR_HOST: tidb
  140. TIDB_VECTOR_PORT: 4000
  141. TIDB_VECTOR_USER: xxx.root
  142. TIDB_VECTOR_PASSWORD: xxxxxx
  143. TIDB_VECTOR_DATABASE: dify
  144. # Chroma configuration
  145. CHROMA_HOST: 127.0.0.1
  146. CHROMA_PORT: 8000
  147. CHROMA_TENANT: default_tenant
  148. CHROMA_DATABASE: default_database
  149. CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider
  150. CHROMA_AUTH_CREDENTIALS: xxxxxx
  151. # Mail configuration, support: resend, smtp
  152. MAIL_TYPE: ''
  153. # default send from email address, if not specified
  154. MAIL_DEFAULT_SEND_FROM: 'YOUR EMAIL FROM (eg: no-reply <no-reply@dify.ai>)'
  155. SMTP_SERVER: ''
  156. SMTP_PORT: 465
  157. SMTP_USERNAME: ''
  158. SMTP_PASSWORD: ''
  159. SMTP_USE_TLS: 'true'
  160. SMTP_OPPORTUNISTIC_TLS: 'false'
  161. # the api-key for resend (https://resend.com)
  162. RESEND_API_KEY: ''
  163. RESEND_API_URL: https://api.resend.com
  164. # The DSN for Sentry error reporting. If not set, Sentry error reporting will be disabled.
  165. SENTRY_DSN: ''
  166. # The sample rate for Sentry events. Default: `1.0`
  167. SENTRY_TRACES_SAMPLE_RATE: 1.0
  168. # The sample rate for Sentry profiles. Default: `1.0`
  169. SENTRY_PROFILES_SAMPLE_RATE: 1.0
  170. # Notion import configuration, support public and internal
  171. NOTION_INTEGRATION_TYPE: public
  172. NOTION_CLIENT_SECRET: you-client-secret
  173. NOTION_CLIENT_ID: you-client-id
  174. NOTION_INTERNAL_SECRET: you-internal-secret
  175. # The sandbox service endpoint.
  176. CODE_EXECUTION_ENDPOINT: "http://sandbox:8194"
  177. CODE_EXECUTION_API_KEY: dify-sandbox
  178. CODE_MAX_NUMBER: 9223372036854775807
  179. CODE_MIN_NUMBER: -9223372036854775808
  180. CODE_MAX_STRING_LENGTH: 80000
  181. TEMPLATE_TRANSFORM_MAX_LENGTH: 80000
  182. CODE_MAX_STRING_ARRAY_LENGTH: 30
  183. CODE_MAX_OBJECT_ARRAY_LENGTH: 30
  184. CODE_MAX_NUMBER_ARRAY_LENGTH: 1000
  185. # SSRF Proxy server
  186. SSRF_PROXY_HTTP_URL: 'http://ssrf_proxy:3128'
  187. SSRF_PROXY_HTTPS_URL: 'http://ssrf_proxy:3128'
  188. # Indexing configuration
  189. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: 1000
  190. depends_on:
  191. - db
  192. - redis
  193. volumes:
  194. # Mount the storage directory to the container, for storing user files.
  195. - ./volumes/app/storage:/app/api/storage
  196. # uncomment to expose dify-api port to host
  197. # ports:
  198. # - "5001:5001"
  199. networks:
  200. - ssrf_proxy_network
  201. - default
  202. # worker service
  203. # The Celery worker for processing the queue.
  204. worker:
  205. image: langgenius/dify-api:0.6.11
  206. restart: always
  207. environment:
  208. CONSOLE_WEB_URL: ''
  209. # Startup mode, 'worker' starts the Celery worker for processing the queue.
  210. MODE: worker
  211. # --- All the configurations below are the same as those in the 'api' service. ---
  212. # The log level for the application. Supported values are `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`
  213. LOG_LEVEL: INFO
  214. # A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`.
  215. # same as the API service
  216. SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U
  217. # The configurations of postgres database connection.
  218. # It is consistent with the configuration in the 'db' service below.
  219. DB_USERNAME: postgres
  220. DB_PASSWORD: difyai123456
  221. DB_HOST: db
  222. DB_PORT: 5432
  223. DB_DATABASE: dify
  224. # The configurations of redis cache connection.
  225. REDIS_HOST: redis
  226. REDIS_PORT: 6379
  227. REDIS_USERNAME: ''
  228. REDIS_PASSWORD: difyai123456
  229. REDIS_DB: 0
  230. REDIS_USE_SSL: 'false'
  231. # The configurations of celery broker.
  232. CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1
  233. # The type of storage to use for storing user files. Supported values are `local` and `s3` and `azure-blob` and `google-storage`, Default: `local`
  234. STORAGE_TYPE: local
  235. STORAGE_LOCAL_PATH: storage
  236. # The S3 storage configurations, only available when STORAGE_TYPE is `s3`.
  237. S3_USE_AWS_MANAGED_IAM: 'false'
  238. S3_ENDPOINT: 'https://xxx.r2.cloudflarestorage.com'
  239. S3_BUCKET_NAME: 'difyai'
  240. S3_ACCESS_KEY: 'ak-difyai'
  241. S3_SECRET_KEY: 'sk-difyai'
  242. S3_REGION: 'us-east-1'
  243. # The Azure Blob storage configurations, only available when STORAGE_TYPE is `azure-blob`.
  244. AZURE_BLOB_ACCOUNT_NAME: 'difyai'
  245. AZURE_BLOB_ACCOUNT_KEY: 'difyai'
  246. AZURE_BLOB_CONTAINER_NAME: 'difyai-container'
  247. AZURE_BLOB_ACCOUNT_URL: 'https://<your_account_name>.blob.core.windows.net'
  248. # The Google storage configurations, only available when STORAGE_TYPE is `google-storage`.
  249. GOOGLE_STORAGE_BUCKET_NAME: 'yout-bucket-name'
  250. # if you want to use Application Default Credentials, you can leave GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64 empty.
  251. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: 'your-google-service-account-json-base64-string'
  252. # The type of vector store to use. Supported values are `weaviate`, `qdrant`, `milvus`, `relyt`, `pgvector`.
  253. VECTOR_STORE: weaviate
  254. # The Weaviate endpoint URL. Only available when VECTOR_STORE is `weaviate`.
  255. WEAVIATE_ENDPOINT: http://weaviate:8080
  256. # The Weaviate API key.
  257. WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  258. # The Qdrant endpoint URL. Only available when VECTOR_STORE is `qdrant`.
  259. QDRANT_URL: http://qdrant:6333
  260. # The Qdrant API key.
  261. QDRANT_API_KEY: difyai123456
  262. # The Qdrant client timeout setting.
  263. QDRANT_CLIENT_TIMEOUT: 20
  264. # The Qdrant client enable gRPC mode.
  265. QDRANT_GRPC_ENABLED: 'false'
  266. # The Qdrant server gRPC mode PORT.
  267. QDRANT_GRPC_PORT: 6334
  268. # Milvus configuration Only available when VECTOR_STORE is `milvus`.
  269. # The milvus host.
  270. MILVUS_HOST: 127.0.0.1
  271. # The milvus host.
  272. MILVUS_PORT: 19530
  273. # The milvus username.
  274. MILVUS_USER: root
  275. # The milvus password.
  276. MILVUS_PASSWORD: Milvus
  277. # The milvus tls switch.
  278. MILVUS_SECURE: 'false'
  279. # Mail configuration, support: resend
  280. MAIL_TYPE: ''
  281. # default send from email address, if not specified
  282. MAIL_DEFAULT_SEND_FROM: 'YOUR EMAIL FROM (eg: no-reply <no-reply@dify.ai>)'
  283. SMTP_SERVER: ''
  284. SMTP_PORT: 465
  285. SMTP_USERNAME: ''
  286. SMTP_PASSWORD: ''
  287. SMTP_USE_TLS: 'true'
  288. SMTP_OPPORTUNISTIC_TLS: 'false'
  289. # the api-key for resend (https://resend.com)
  290. RESEND_API_KEY: ''
  291. RESEND_API_URL: https://api.resend.com
  292. # relyt configurations
  293. RELYT_HOST: db
  294. RELYT_PORT: 5432
  295. RELYT_USER: postgres
  296. RELYT_PASSWORD: difyai123456
  297. RELYT_DATABASE: postgres
  298. # tencent configurations
  299. TENCENT_VECTOR_DB_URL: http://127.0.0.1
  300. TENCENT_VECTOR_DB_API_KEY: dify
  301. TENCENT_VECTOR_DB_TIMEOUT: 30
  302. TENCENT_VECTOR_DB_USERNAME: dify
  303. TENCENT_VECTOR_DB_DATABASE: dify
  304. TENCENT_VECTOR_DB_SHARD: 1
  305. TENCENT_VECTOR_DB_REPLICAS: 2
  306. # pgvector configurations
  307. PGVECTOR_HOST: pgvector
  308. PGVECTOR_PORT: 5432
  309. PGVECTOR_USER: postgres
  310. PGVECTOR_PASSWORD: difyai123456
  311. PGVECTOR_DATABASE: dify
  312. # tidb vector configurations
  313. TIDB_VECTOR_HOST: tidb
  314. TIDB_VECTOR_PORT: 4000
  315. TIDB_VECTOR_USER: xxx.root
  316. TIDB_VECTOR_PASSWORD: xxxxxx
  317. TIDB_VECTOR_DATABASE: dify
  318. # Chroma configuration
  319. CHROMA_HOST: 127.0.0.1
  320. CHROMA_PORT: 8000
  321. CHROMA_TENANT: default_tenant
  322. CHROMA_DATABASE: default_database
  323. CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider
  324. CHROMA_AUTH_CREDENTIALS: xxxxxx
  325. # Notion import configuration, support public and internal
  326. NOTION_INTEGRATION_TYPE: public
  327. NOTION_CLIENT_SECRET: you-client-secret
  328. NOTION_CLIENT_ID: you-client-id
  329. NOTION_INTERNAL_SECRET: you-internal-secret
  330. # Indexing configuration
  331. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: 1000
  332. depends_on:
  333. - db
  334. - redis
  335. volumes:
  336. # Mount the storage directory to the container, for storing user files.
  337. - ./volumes/app/storage:/app/api/storage
  338. networks:
  339. - ssrf_proxy_network
  340. - default
  341. # Frontend web application.
  342. web:
  343. image: langgenius/dify-web:0.6.11
  344. restart: always
  345. environment:
  346. # The base URL of console application api server, refers to the Console base URL of WEB service if console domain is
  347. # different from api or web app domain.
  348. # example: http://cloud.dify.ai
  349. CONSOLE_API_URL: ''
  350. # The URL for Web APP api server, refers to the Web App base URL of WEB service if web app domain is different from
  351. # console or api domain.
  352. # example: http://udify.app
  353. APP_API_URL: ''
  354. # The DSN for Sentry error reporting. If not set, Sentry error reporting will be disabled.
  355. SENTRY_DSN: ''
  356. # uncomment to expose dify-web port to host
  357. # ports:
  358. # - "3000:3000"
  359. # The postgres database.
  360. db:
  361. image: postgres:15-alpine
  362. restart: always
  363. environment:
  364. PGUSER: postgres
  365. # The password for the default postgres user.
  366. POSTGRES_PASSWORD: difyai123456
  367. # The name of the default postgres database.
  368. POSTGRES_DB: dify
  369. # postgres data directory
  370. PGDATA: /var/lib/postgresql/data/pgdata
  371. volumes:
  372. - ./volumes/db/data:/var/lib/postgresql/data
  373. # uncomment to expose db(postgresql) port to host
  374. # ports:
  375. # - "5432:5432"
  376. healthcheck:
  377. test: [ "CMD", "pg_isready" ]
  378. interval: 1s
  379. timeout: 3s
  380. retries: 30
  381. # The redis cache.
  382. redis:
  383. image: redis:6-alpine
  384. restart: always
  385. volumes:
  386. # Mount the redis data directory to the container.
  387. - ./volumes/redis/data:/data
  388. # Set the redis password when startup redis server.
  389. command: redis-server --requirepass difyai123456
  390. healthcheck:
  391. test: [ "CMD", "redis-cli", "ping" ]
  392. # uncomment to expose redis port to host
  393. # ports:
  394. # - "6379:6379"
  395. # The Weaviate vector store.
  396. weaviate:
  397. image: semitechnologies/weaviate:1.19.0
  398. restart: always
  399. volumes:
  400. # Mount the Weaviate data directory to the container.
  401. - ./volumes/weaviate:/var/lib/weaviate
  402. environment:
  403. # The Weaviate configurations
  404. # You can refer to the [Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars) documentation for more information.
  405. QUERY_DEFAULTS_LIMIT: 25
  406. AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'false'
  407. PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
  408. DEFAULT_VECTORIZER_MODULE: 'none'
  409. CLUSTER_HOSTNAME: 'node1'
  410. AUTHENTICATION_APIKEY_ENABLED: 'true'
  411. AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih'
  412. AUTHENTICATION_APIKEY_USERS: 'hello@dify.ai'
  413. AUTHORIZATION_ADMINLIST_ENABLED: 'true'
  414. AUTHORIZATION_ADMINLIST_USERS: 'hello@dify.ai'
  415. # uncomment to expose weaviate port to host
  416. # ports:
  417. # - "8080:8080"
  418. # The DifySandbox
  419. sandbox:
  420. image: langgenius/dify-sandbox:0.2.1
  421. restart: always
  422. environment:
  423. # The DifySandbox configurations
  424. # Make sure you are changing this key for your deployment with a strong key.
  425. # You can generate a strong key using `openssl rand -base64 42`.
  426. API_KEY: dify-sandbox
  427. GIN_MODE: 'release'
  428. WORKER_TIMEOUT: 15
  429. ENABLE_NETWORK: 'true'
  430. HTTP_PROXY: 'http://ssrf_proxy:3128'
  431. HTTPS_PROXY: 'http://ssrf_proxy:3128'
  432. SANDBOX_PORT: 8194
  433. volumes:
  434. - ./volumes/sandbox/dependencies:/dependencies
  435. networks:
  436. - ssrf_proxy_network
  437. # ssrf_proxy server
  438. # for more information, please refer to
  439. # https://docs.dify.ai/getting-started/install-self-hosted/install-faq#id-16.-why-is-ssrf_proxy-needed
  440. ssrf_proxy:
  441. image: ubuntu/squid:latest
  442. restart: always
  443. volumes:
  444. # pls clearly modify the squid.conf file to fit your network environment.
  445. - ./volumes/ssrf_proxy/squid.conf:/etc/squid/squid.conf
  446. networks:
  447. - ssrf_proxy_network
  448. - default
  449. # Qdrant vector store.
  450. # uncomment to use qdrant as vector store.
  451. # (if uncommented, you need to comment out the weaviate service above,
  452. # and set VECTOR_STORE to qdrant in the api & worker service.)
  453. # qdrant:
  454. # image: langgenius/qdrant:v1.7.3
  455. # restart: always
  456. # volumes:
  457. # - ./volumes/qdrant:/qdrant/storage
  458. # environment:
  459. # QDRANT_API_KEY: 'difyai123456'
  460. # # uncomment to expose qdrant port to host
  461. # # ports:
  462. # # - "6333:6333"
  463. # # - "6334:6334"
  464. # The pgvector vector database.
  465. # Uncomment to use qdrant as vector store.
  466. # pgvector:
  467. # image: pgvector/pgvector:pg16
  468. # restart: always
  469. # environment:
  470. # PGUSER: postgres
  471. # # The password for the default postgres user.
  472. # POSTGRES_PASSWORD: difyai123456
  473. # # The name of the default postgres database.
  474. # POSTGRES_DB: dify
  475. # # postgres data directory
  476. # PGDATA: /var/lib/postgresql/data/pgdata
  477. # volumes:
  478. # - ./volumes/pgvector/data:/var/lib/postgresql/data
  479. # # uncomment to expose db(postgresql) port to host
  480. # # ports:
  481. # # - "5433:5432"
  482. # healthcheck:
  483. # test: [ "CMD", "pg_isready" ]
  484. # interval: 1s
  485. # timeout: 3s
  486. # retries: 30
  487. # The nginx reverse proxy.
  488. # used for reverse proxying the API service and Web service.
  489. nginx:
  490. image: nginx:latest
  491. restart: always
  492. volumes:
  493. - ./nginx/nginx.conf:/etc/nginx/nginx.conf
  494. - ./nginx/proxy.conf:/etc/nginx/proxy.conf
  495. - ./nginx/conf.d:/etc/nginx/conf.d
  496. #- ./nginx/ssl:/etc/ssl
  497. depends_on:
  498. - api
  499. - web
  500. ports:
  501. - "80:80"
  502. #- "443:443"
  503. networks:
  504. # create a network between sandbox, api and ssrf_proxy, and can not access outside.
  505. ssrf_proxy_network:
  506. driver: bridge
  507. internal: true