docker-compose.yaml 20 KB

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