init: dev-ops文件
This commit is contained in:
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxProjectSettings">
|
||||||
|
<option name="commitMessageIssueKeyValidationOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
<option name="commitMessageValidationEnabledOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
128
docs/api/curl.json
Normal file
128
docs/api/curl.json
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "1",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " +",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " ",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "1",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " equals",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "2",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": "STOP"
|
||||||
|
},
|
||||||
|
"content": null,
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": "STOP",
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
7
docs/api/curl.sh
Normal file
7
docs/api/curl.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
curl http://117.72.115.188:11434/api/generate \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"model": "deepseek-r1:1.5b",
|
||||||
|
"prompt": "1+1",
|
||||||
|
"stream": false
|
||||||
|
}'
|
||||||
128
docs/dev-ops/api/curl.json
Normal file
128
docs/dev-ops/api/curl.json
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "1",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " +",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " ",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "1",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": " equals",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": ""
|
||||||
|
},
|
||||||
|
"content": "2",
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": null,
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"output": {
|
||||||
|
"messageType": "ASSISTANT",
|
||||||
|
"properties": {
|
||||||
|
"id": "chatcmpl-B3HPw95SsqmhoWeJ8azGLxK1Vf4At",
|
||||||
|
"role": "ASSISTANT",
|
||||||
|
"finishReason": "STOP"
|
||||||
|
},
|
||||||
|
"content": null,
|
||||||
|
"media": []
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"finishReason": "STOP",
|
||||||
|
"contentFilterMetadata": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
7
docs/dev-ops/api/curl.sh
Normal file
7
docs/dev-ops/api/curl.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
curl http://117.72.115.188:11434/api/generate \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"model": "deepseek-r1:1.5b",
|
||||||
|
"prompt": "1+1",
|
||||||
|
"stream": false
|
||||||
|
}'
|
||||||
83
docs/dev-ops/docker-compose-environment-aliyun.yml
Normal file
83
docs/dev-ops/docker-compose-environment-aliyun.yml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# docker-compose -f docker-compose-environment-aliyun.yml up -d
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
# 对话模型
|
||||||
|
# ollama pull deepseek-r1:1.5b
|
||||||
|
# 运行模型
|
||||||
|
# ollama run deepseek-r1:1.5b
|
||||||
|
# 联网模型
|
||||||
|
# ollama pull nomic-embed-text
|
||||||
|
ollama:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/ollama:0.5.10
|
||||||
|
container_name: ollama
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "11434:11434"
|
||||||
|
redis:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis:6.2
|
||||||
|
container_name: redis
|
||||||
|
restart: always
|
||||||
|
hostname: redis
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- 16379:6379
|
||||||
|
volumes:
|
||||||
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
command: redis-server /usr/local/etc/redis/redis.conf
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "redis-cli", "ping" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
# RedisAdmin https://github.com/joeferner/redis-commander
|
||||||
|
# 账密 admin/admin
|
||||||
|
redis-admin:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis-commander:0.8.0
|
||||||
|
container_name: redis-admin
|
||||||
|
hostname: redis-commander
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
environment:
|
||||||
|
- REDIS_HOSTS=local:redis:6379
|
||||||
|
- HTTP_USER=admin
|
||||||
|
- HTTP_PASSWORD=admin
|
||||||
|
- LANG=C.UTF-8
|
||||||
|
- LANGUAGE=C.UTF-8
|
||||||
|
- LC_ALL=C.UTF-8
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
vector_db:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/pgvector:v0.5.0
|
||||||
|
container_name: vector_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
- POSTGRES_DB=ai-rag-knowledge
|
||||||
|
- PGPASSWORD=postgres
|
||||||
|
volumes:
|
||||||
|
- ./pgvector/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
logging:
|
||||||
|
options:
|
||||||
|
max-size: 10m
|
||||||
|
max-file: "3"
|
||||||
|
ports:
|
||||||
|
- '15432:5432'
|
||||||
|
healthcheck:
|
||||||
|
test: "pg_isready -U postgres -d ai-rag-knowledge"
|
||||||
|
interval: 2s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
my-network:
|
||||||
|
driver: bridge
|
||||||
83
docs/dev-ops/docker-compose-environment.yml
Normal file
83
docs/dev-ops/docker-compose-environment.yml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# docker-comopse -f docker-compose-environment.yml up -d
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
# 对话模型
|
||||||
|
# ollama pull deepseek-r1:1.5b
|
||||||
|
# 运行模型
|
||||||
|
# ollama run deepseek-r1:1.5b
|
||||||
|
# 联网模型
|
||||||
|
# ollama pull nomic-embed-text
|
||||||
|
ollama:
|
||||||
|
image: ollama/ollama:0.5.10
|
||||||
|
container_name: ollama
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "11434:11434"
|
||||||
|
redis:
|
||||||
|
image: redis:6.2
|
||||||
|
container_name: redis
|
||||||
|
restart: always
|
||||||
|
hostname: redis
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- 16379:6379
|
||||||
|
volumes:
|
||||||
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
command: redis-server /usr/local/etc/redis/redis.conf
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "redis-cli", "ping" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
# RedisAdmin https://github.com/joeferner/redis-commander
|
||||||
|
# 账密 admin/admin
|
||||||
|
redis-admin:
|
||||||
|
image: spryker/redis-commander:0.8.0
|
||||||
|
container_name: redis-admin
|
||||||
|
hostname: redis-commander
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
environment:
|
||||||
|
- REDIS_HOSTS=local:redis:6379
|
||||||
|
- HTTP_USER=admin
|
||||||
|
- HTTP_PASSWORD=admin
|
||||||
|
- LANG=C.UTF-8
|
||||||
|
- LANGUAGE=C.UTF-8
|
||||||
|
- LC_ALL=C.UTF-8
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
vector_db:
|
||||||
|
image: pgvector/pgvector:v0.5.0
|
||||||
|
container_name: vector_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
- POSTGRES_DB=springai
|
||||||
|
- PGPASSWORD=postgres
|
||||||
|
volumes:
|
||||||
|
- ./pgvector/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
logging:
|
||||||
|
options:
|
||||||
|
max-size: 10m
|
||||||
|
max-file: "3"
|
||||||
|
ports:
|
||||||
|
- '5432:5432'
|
||||||
|
healthcheck:
|
||||||
|
test: "pg_isready -U postgres -d vector_store"
|
||||||
|
interval: 2s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
my-network:
|
||||||
|
driver: bridge
|
||||||
1
docs/dev-ops/pgvector/sql/init.sql
Normal file
1
docs/dev-ops/pgvector/sql/init.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CREATE EXTENSION IF NOT EXISTS vector;
|
||||||
2
docs/dev-ops/redis/redis.conf
Normal file
2
docs/dev-ops/redis/redis.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bind 0.0.0.0
|
||||||
|
port 6379
|
||||||
83
docs/docker-compose-environment-aliyun.yml
Normal file
83
docs/docker-compose-environment-aliyun.yml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# docker-compose -f docker-compose-environment-aliyun.yml up -d
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
# 对话模型
|
||||||
|
# ollama pull deepseek-r1:1.5b
|
||||||
|
# 运行模型
|
||||||
|
# ollama run deepseek-r1:1.5b
|
||||||
|
# 联网模型
|
||||||
|
# ollama pull nomic-embed-text
|
||||||
|
ollama:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/ollama:0.5.10
|
||||||
|
container_name: ollama
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "11434:11434"
|
||||||
|
redis:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis:6.2
|
||||||
|
container_name: redis
|
||||||
|
restart: always
|
||||||
|
hostname: redis
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- 16379:6379
|
||||||
|
volumes:
|
||||||
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
command: redis-server /usr/local/etc/redis/redis.conf
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "redis-cli", "ping" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
# RedisAdmin https://github.com/joeferner/redis-commander
|
||||||
|
# 账密 admin/admin
|
||||||
|
redis-admin:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/redis-commander:0.8.0
|
||||||
|
container_name: redis-admin
|
||||||
|
hostname: redis-commander
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
environment:
|
||||||
|
- REDIS_HOSTS=local:redis:6379
|
||||||
|
- HTTP_USER=admin
|
||||||
|
- HTTP_PASSWORD=admin
|
||||||
|
- LANG=C.UTF-8
|
||||||
|
- LANGUAGE=C.UTF-8
|
||||||
|
- LC_ALL=C.UTF-8
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
vector_db:
|
||||||
|
image: registry.cn-hangzhou.aliyuncs.com/xfg-studio/pgvector:v0.5.0
|
||||||
|
container_name: vector_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
- POSTGRES_DB=ai-rag-knowledge
|
||||||
|
- PGPASSWORD=postgres
|
||||||
|
volumes:
|
||||||
|
- ./pgvector/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
logging:
|
||||||
|
options:
|
||||||
|
max-size: 10m
|
||||||
|
max-file: "3"
|
||||||
|
ports:
|
||||||
|
- '15432:5432'
|
||||||
|
healthcheck:
|
||||||
|
test: "pg_isready -U postgres -d ai-rag-knowledge"
|
||||||
|
interval: 2s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
my-network:
|
||||||
|
driver: bridge
|
||||||
83
docs/docker-compose-environment.yml
Normal file
83
docs/docker-compose-environment.yml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# docker-comopse -f docker-compose-environment.yml up -d
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
# 对话模型
|
||||||
|
# ollama pull deepseek-r1:1.5b
|
||||||
|
# 运行模型
|
||||||
|
# ollama run deepseek-r1:1.5b
|
||||||
|
# 联网模型
|
||||||
|
# ollama pull nomic-embed-text
|
||||||
|
ollama:
|
||||||
|
image: ollama/ollama:0.5.10
|
||||||
|
container_name: ollama
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "11434:11434"
|
||||||
|
redis:
|
||||||
|
image: redis:6.2
|
||||||
|
container_name: redis
|
||||||
|
restart: always
|
||||||
|
hostname: redis
|
||||||
|
privileged: true
|
||||||
|
ports:
|
||||||
|
- 16379:6379
|
||||||
|
volumes:
|
||||||
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
command: redis-server /usr/local/etc/redis/redis.conf
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "redis-cli", "ping" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
# RedisAdmin https://github.com/joeferner/redis-commander
|
||||||
|
# 账密 admin/admin
|
||||||
|
redis-admin:
|
||||||
|
image: spryker/redis-commander:0.8.0
|
||||||
|
container_name: redis-admin
|
||||||
|
hostname: redis-commander
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
environment:
|
||||||
|
- REDIS_HOSTS=local:redis:6379
|
||||||
|
- HTTP_USER=admin
|
||||||
|
- HTTP_PASSWORD=admin
|
||||||
|
- LANG=C.UTF-8
|
||||||
|
- LANGUAGE=C.UTF-8
|
||||||
|
- LC_ALL=C.UTF-8
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
vector_db:
|
||||||
|
image: pgvector/pgvector:v0.5.0
|
||||||
|
container_name: vector_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=postgres
|
||||||
|
- POSTGRES_DB=springai
|
||||||
|
- PGPASSWORD=postgres
|
||||||
|
volumes:
|
||||||
|
- ./pgvector/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
logging:
|
||||||
|
options:
|
||||||
|
max-size: 10m
|
||||||
|
max-file: "3"
|
||||||
|
ports:
|
||||||
|
- '5432:5432'
|
||||||
|
healthcheck:
|
||||||
|
test: "pg_isready -U postgres -d vector_store"
|
||||||
|
interval: 2s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
|
networks:
|
||||||
|
- my-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
my-network:
|
||||||
|
driver: bridge
|
||||||
1
docs/pgvector/sql/init.sql
Normal file
1
docs/pgvector/sql/init.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CREATE EXTENSION IF NOT EXISTS vector;
|
||||||
2
docs/redis/redis.conf
Normal file
2
docs/redis/redis.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bind 0.0.0.0
|
||||||
|
port 6379
|
||||||
Reference in New Issue
Block a user