Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (100 loc) · 2.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (100 loc) · 2.83 KB
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
# mem — Local development stack
# Phase 1 MVP: postgres (with pgvector) + redis + minio + memd + worker
# Web UI 单独 `cd web && npm run dev` 启动 (vite)
#
# 使用: docker compose up -d
services:
postgres:
image: pgvector/pgvector:pg16
container_name: mem-postgres
restart: unless-stopped
environment:
POSTGRES_USER: mem
POSTGRES_PASSWORD: mem
POSTGRES_DB: mem
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mem"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:7-alpine
container_name: mem-redis
restart: unless-stopped
# Host port shifted to 6479 to coexist with other local Redis instances.
# Internal port stays 6379 so service-to-service traffic uses the default.
ports:
- "6479:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
minio:
# MinIO withdrew its Docker Hub repositories in October 2025; quay.io serves
# the same image.
image: quay.io/minio/minio:latest
container_name: mem-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: mem
MINIO_ROOT_PASSWORD: mem-minio-password
ports:
- "9100:9000" # S3 API (host port shifted to coexist with other MinIO instances)
- "9101:9001" # Console
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
# Bootstrap: create default bucket
minio-init:
image: quay.io/minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 mem mem-minio-password;
mc mb --ignore-existing local/mem;
mc anonymous set none local/mem || true;
exit 0;
"
# === 应用服务(Phase 1 W1 开始接入)===
# memd:
# build: ./server
# container_name: mem-memd
# restart: unless-stopped
# depends_on:
# postgres: { condition: service_healthy }
# redis: { condition: service_healthy }
# minio: { condition: service_healthy }
# environment:
# MEM_DB_URL: postgres://mem:mem@postgres:5432/mem?sslmode=disable
# MEM_REDIS_URL: redis://redis:6379
# MEM_S3_ENDPOINT: http://minio:9000
# MEM_S3_BUCKET: mem
# MEM_S3_ACCESS_KEY: mem
# MEM_S3_SECRET_KEY: mem-minio-password
# MEM_WORKER_GRPC: worker:50051
# ports:
# - "8787:8787"
# worker:
# build: ./worker
# container_name: mem-worker
# restart: unless-stopped
# ports:
# - "50051:50051"
volumes:
postgres_data:
redis_data:
minio_data: