-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathcompose.dify.yml
178 lines (167 loc) · 5.22 KB
/
compose.dify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
services:
dify-api:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-api
image: langgenius/dify-api:${HARBOR_DIFY_VERSION}
env_file:
- ./.env
- ./dify/override.env
environment:
MODE: api
depends_on:
- dify-db
- dify-redis
volumes:
- ${HARBOR_DIFY_VOLUMES}/app/storage:/app/api/storage
networks:
- harbor-network
dify-worker:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-worker
image: langgenius/dify-api:${HARBOR_DIFY_VERSION}
env_file:
- ./.env
- ./dify/override.env
environment:
MODE: worker
depends_on:
- dify-db
- dify-redis
volumes:
- ${HARBOR_DIFY_VOLUMES}/app/storage:/app/api/storage
networks:
- harbor-network
dify-web:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-web
image: langgenius/dify-web:${HARBOR_DIFY_VERSION}
networks:
- harbor-network
env_file:
- ./.env
- ./dify/override.env
dify-db:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-db
image: postgres:15-alpine
env_file:
- ./.env
- ./dify/override.env
volumes:
- ${HARBOR_DIFY_VOLUMES}/db/data:/var/lib/postgresql/data/pgdata
ports:
- ${HARBOR_DIFY_DB_HOST_PORT}:5432
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 1s
timeout: 3s
retries: 30
networks:
- harbor-network
dify-redis:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-redis
image: redis:6-alpine
env_file:
- ./.env
- ./dify/override.env
volumes:
- ${HARBOR_DIFY_VOLUMES}/redis/data:/data
command: redis-server --requirepass difyai123456
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 3s
networks:
- harbor-network
dify-sandbox:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-sandbox
image: langgenius/dify-sandbox:${HARBOR_DIFY_SANDBOX_VERSION}
env_file:
- ./.env
- ./dify/override.env
volumes:
- ${HARBOR_DIFY_VOLUMES}/sandbox/dependencies:/dependencies
networks:
- harbor-network
dify-ssrf:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-ssrf
image: ubuntu/squid:latest
env_file:
- ./.env
- ./dify/override.env
volumes:
- ./dify/ssrf_proxy/squid.conf.template:/etc/squid/squid.conf.template
- ./dify/ssrf_proxy/docker-entrypoint.sh:/docker-entrypoint-mount.sh
entrypoint: [ "sh", "-c", "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ]
environment:
HTTP_PORT: 3128
COREDUMP_DIR: /var/spool/squid
REVERSE_PROXY_PORT: 8194
SANDBOX_HOST: dify-sandbox
SANDBOX_PORT: 8194
networks:
- harbor-network
dify-certbot:
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-certbot
image: certbot/certbot
env_file:
- ./.env
- ./dify/override.env
volumes:
- ${HARBOR_DIFY_VOLUMES}/certbot/conf:/etc/letsencrypt
- ${HARBOR_DIFY_VOLUMES}/certbot/www:/var/www/html
- ${HARBOR_DIFY_VOLUMES}/certbot/logs:/var/log/letsencrypt
- ${HARBOR_DIFY_VOLUMES}/certbot/conf/live:/etc/letsencrypt/live
- ./dify/certbot/update-cert.template.txt:/update-cert.template.txt
- ./dify/certbot/docker-entrypoint.sh:/docker-entrypoint.sh
entrypoint: [ "/docker-entrypoint.sh" ]
command: ["tail", "-f", "/dev/null"]
networks:
- harbor-network
dify:
image: nginx:latest
container_name: ${HARBOR_CONTAINER_PREFIX}.dify
volumes:
- ./dify/nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
- ./dify/nginx/proxy.conf.template:/etc/nginx/proxy.conf.template
- ./dify/nginx/https.conf.template:/etc/nginx/https.conf.template
- ./dify/nginx/conf.d:/etc/nginx/conf.d
- ./dify/nginx/docker-entrypoint.sh:/docker-entrypoint-mount.sh
- ./dify/nginx/ssl:/etc/ssl
- ${HARBOR_DIFY_VOLUMES}/certbot/conf/live:/etc/letsencrypt/live
- ${HARBOR_DIFY_VOLUMES}/certbot/conf:/etc/letsencrypt
- ${HARBOR_DIFY_VOLUMES}/certbot/www:/var/www/html
entrypoint: [ "sh", "-c", "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ]
env_file:
- ./.env
- ./dify/override.env
depends_on:
- dify-api
- dify-web
ports:
- ${HARBOR_DIFY_HOST_PORT}:80
networks:
- harbor-network
dify-weaviate:
image: semitechnologies/weaviate:${HARBOR_DIFY_WEAVIATE_VERSION}
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-weaviate
volumes:
- ${HARBOR_DIFY_VOLUMES}/weaviate:/var/lib/weaviate
env_file:
- ./.env
- ./dify/override.env
networks:
- harbor-network
dify-openai:
build:
context: ./dify/openai
dockerfile: Dockerfile
container_name: ${HARBOR_CONTAINER_PREFIX}.dify-openai
ports:
- ${HARBOR_DIFY_D2O_HOST_PORT}:3000
env_file:
- ./.env
- ./dify/override.env
volumes:
- ./dify/openai/app.js:/dify2openai/app.js
networks:
- harbor-network
environment:
- DIFY_API_URL=http://harbor.dify:80
- BOT_TYPE=${HARBOR_DIFY_BOT_TYPE}