chore(deploy): 本地部署脚本、容器配置与运行说明
PostgreSQL/pgvector 与 Redis 独立容器,后端、worker、前端可一键启停;不覆盖既有密钥。
This commit is contained in:
1 parent
83a16ed07d
commit
5be5ca3376
18 files changed
+1796
No files matched your search
@@ -0,0 +1,40 @@
|
||||
name: chattermate-local
|
||||
|
||||
services:
|
||||
db:
|
||||
image: pgvector/pgvector:0.8.2-pg16
|
||||
environment:
|
||||
POSTGRES_DB: chattermate
|
||||
POSTGRES_USER: chattermate
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Run ./deploy/local/local.sh init first}
|
||||
ports:
|
||||
- "127.0.0.1:15432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
command: ["postgres", "-c", "shared_buffers=64MB", "-c", "max_connections=80"]
|
||||
mem_limit: 384m
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U chattermate -d chattermate"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
|
||||
redis:
|
||||
image: redis:7.4
|
||||
ports:
|
||||
- "127.0.0.1:16380:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "64mb", "--maxmemory-policy", "allkeys-lru"]
|
||||
mem_limit: 96m
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
Reference in new issue
Block a user