yuanpeng revised this gist . Go to revision
1 file changed, 170 insertions
dify_docker_compose.yml(file created)
@@ -0,0 +1,170 @@ | |||
1 | + | services: | |
2 | + | api: | |
3 | + | image: langgenius/dify-api:0.14.0 | |
4 | + | restart: always | |
5 | + | environment: | |
6 | + | MODE: api | |
7 | + | LOG_LEVEL: INFO | |
8 | + | SECRET_KEY: O/PzhwXRXX+8rv8CK144R8EPdFkOFODB/1QwI8iR4FApqah50KJD9gcU | |
9 | + | CONSOLE_WEB_URL: '' | |
10 | + | INIT_PASSWORD: '' | |
11 | + | CONSOLE_API_URL: '' | |
12 | + | SERVICE_API_URL: '' | |
13 | + | APP_WEB_URL: '' | |
14 | + | FILES_URL: '' | |
15 | + | MIGRATION_ENABLED: 'true' | |
16 | + | DB_USERNAME: postgres | |
17 | + | DB_PASSWORD: difyai123456 | |
18 | + | DB_HOST: db | |
19 | + | DB_PORT: 5432 | |
20 | + | DB_DATABASE: dify | |
21 | + | REDIS_HOST: redis | |
22 | + | REDIS_PORT: 6379 | |
23 | + | REDIS_USERNAME: '' | |
24 | + | REDIS_PASSWORD: difyai123456 | |
25 | + | REDIS_USE_SSL: 'false' | |
26 | + | REDIS_DB: 0 | |
27 | + | CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 | |
28 | + | WEB_API_CORS_ALLOW_ORIGINS: '*' | |
29 | + | CONSOLE_CORS_ALLOW_ORIGINS: '*' | |
30 | + | STORAGE_TYPE: local | |
31 | + | STORAGE_LOCAL_PATH: storage | |
32 | + | S3_ENDPOINT: 'https://xxx.r2.cloudflarestorage.com' | |
33 | + | S3_BUCKET_NAME: 'difyai' | |
34 | + | S3_ACCESS_KEY: 'ak-difyai' | |
35 | + | S3_SECRET_KEY: 'sk-difyai' | |
36 | + | S3_REGION: 'us-east-1' | |
37 | + | VECTOR_STORE: weaviate | |
38 | + | WEAVIATE_ENDPOINT: http://weaviate:8080 | |
39 | + | WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih | |
40 | + | QDRANT_URL: http://qdrant:6333 | |
41 | + | QDRANT_API_KEY: difyai123456 | |
42 | + | QDRANT_CLIENT_TIMEOUT: 20 | |
43 | + | MILVUS_HOST: 127.0.0.1 | |
44 | + | MILVUS_PORT: 19530 | |
45 | + | MILVUS_USER: root | |
46 | + | MILVUS_PASSWORD: Milvus | |
47 | + | MILVUS_SECURE: 'false' | |
48 | + | MAIL_TYPE: '' | |
49 | + | MAIL_DEFAULT_SEND_FROM: '[email protected]' | |
50 | + | SMTP_SERVER: 'smtp.gmail.com' | |
51 | + | SMTP_PORT: 587 | |
52 | + | SMTP_USERNAME: '[email protected]' | |
53 | + | SMTP_PASSWORD: 'snzmrunewisaakmv' | |
54 | + | SMTP_USE_TLS: 'true' | |
55 | + | RESEND_API_KEY: '' | |
56 | + | RESEND_API_URL: https://api.resend.com | |
57 | + | SENTRY_DSN: '' | |
58 | + | SENTRY_TRACES_SAMPLE_RATE: 1.0 | |
59 | + | SENTRY_PROFILES_SAMPLE_RATE: 1.0 | |
60 | + | depends_on: | |
61 | + | - db | |
62 | + | - redis | |
63 | + | volumes: | |
64 | + | - ./volumes/app/storage:/app/api/storage | |
65 | + | ||
66 | + | worker: | |
67 | + | image: langgenius/dify-api:0.14.0 | |
68 | + | restart: always | |
69 | + | environment: | |
70 | + | MODE: worker | |
71 | + | LOG_LEVEL: INFO | |
72 | + | SECRET_KEY: O/PzhwXRXX+8rv8CK144R8EPdFkOFODB/1QwI8iR4FApqah50KJD9gcU | |
73 | + | DB_USERNAME: postgres | |
74 | + | DB_PASSWORD: difyai123456 | |
75 | + | DB_HOST: db | |
76 | + | DB_PORT: 5432 | |
77 | + | DB_DATABASE: dify | |
78 | + | REDIS_HOST: redis | |
79 | + | REDIS_PORT: 6379 | |
80 | + | REDIS_USERNAME: '' | |
81 | + | REDIS_PASSWORD: difyai123456 | |
82 | + | REDIS_DB: 0 | |
83 | + | REDIS_USE_SSL: 'false' | |
84 | + | CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 | |
85 | + | STORAGE_TYPE: local | |
86 | + | STORAGE_LOCAL_PATH: storage | |
87 | + | VECTOR_STORE: weaviate | |
88 | + | WEAVIATE_ENDPOINT: http://weaviate:8080 | |
89 | + | WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih | |
90 | + | QDRANT_URL: http://qdrant:6333 | |
91 | + | QDRANT_API_KEY: difyai123456 | |
92 | + | QDRANT_CLIENT_TIMEOUT: 20 | |
93 | + | MILVUS_HOST: 127.0.0.1 | |
94 | + | MILVUS_PORT: 19530 | |
95 | + | MILVUS_USER: root | |
96 | + | MILVUS_PASSWORD: Milvus | |
97 | + | MILVUS_SECURE: 'false' | |
98 | + | MAIL_TYPE: '' | |
99 | + | MAIL_DEFAULT_SEND_FROM: '[email protected]' | |
100 | + | RESEND_API_KEY: '' | |
101 | + | RESEND_API_URL: https://api.resend.com | |
102 | + | depends_on: | |
103 | + | - db | |
104 | + | - redis | |
105 | + | volumes: | |
106 | + | - ./volumes/app/storage:/app/api/storage | |
107 | + | ||
108 | + | web: | |
109 | + | image: langgenius/dify-web:0.14.0 | |
110 | + | restart: always | |
111 | + | environment: | |
112 | + | EDITION: SELF_HOSTED | |
113 | + | CONSOLE_API_URL: '' | |
114 | + | APP_API_URL: '' | |
115 | + | SENTRY_DSN: '' | |
116 | + | ||
117 | + | db: | |
118 | + | image: postgres:15-alpine | |
119 | + | restart: always | |
120 | + | environment: | |
121 | + | PGUSER: postgres | |
122 | + | POSTGRES_PASSWORD: difyai123456 | |
123 | + | POSTGRES_DB: dify | |
124 | + | PGDATA: /var/lib/postgresql/data/pgdata | |
125 | + | volumes: | |
126 | + | - ./volumes/db/data:/var/lib/postgresql/data | |
127 | + | healthcheck: | |
128 | + | test: [ "CMD", "pg_isready" ] | |
129 | + | interval: 1s | |
130 | + | timeout: 3s | |
131 | + | retries: 30 | |
132 | + | ||
133 | + | redis: | |
134 | + | image: redis:6-alpine | |
135 | + | restart: always | |
136 | + | volumes: | |
137 | + | - ./volumes/redis/data:/data | |
138 | + | command: redis-server --requirepass difyai123456 | |
139 | + | healthcheck: | |
140 | + | test: [ "CMD", "redis-cli", "ping" ] | |
141 | + | ||
142 | + | weaviate: | |
143 | + | image: semitechnologies/weaviate:1.19.0 | |
144 | + | restart: always | |
145 | + | volumes: | |
146 | + | - ./volumes/weaviate:/var/lib/weaviate | |
147 | + | environment: | |
148 | + | QUERY_DEFAULTS_LIMIT: 25 | |
149 | + | AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'false' | |
150 | + | PERSISTENCE_DATA_PATH: '/var/lib/weaviate' | |
151 | + | DEFAULT_VECTORIZER_MODULE: 'none' | |
152 | + | CLUSTER_HOSTNAME: 'node1' | |
153 | + | AUTHENTICATION_APIKEY_ENABLED: 'true' | |
154 | + | AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih' | |
155 | + | AUTHENTICATION_APIKEY_USERS: '[email protected]' | |
156 | + | AUTHORIZATION_ADMINLIST_ENABLED: 'true' | |
157 | + | AUTHORIZATION_ADMINLIST_USERS: '[email protected]' | |
158 | + | ||
159 | + | nginx: | |
160 | + | image: nginx:latest | |
161 | + | restart: always | |
162 | + | volumes: | |
163 | + | - ./nginx/nginx.conf:/etc/nginx/nginx.conf | |
164 | + | - ./nginx/proxy.conf:/etc/nginx/proxy.conf | |
165 | + | - ./nginx/conf.d:/etc/nginx/conf.d | |
166 | + | depends_on: | |
167 | + | - api | |
168 | + | - web | |
169 | + | ports: | |
170 | + | - "8060:80" |
Newer
Older