-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (77 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
82 lines (77 loc) · 2.06 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
version: '3.8'
services:
# PostgreSQL for episodic and semantic memory
postgres:
image: postgres:15-alpine
container_name: memorycore-postgres
environment:
POSTGRES_DB: memorycore
POSTGRES_USER: memorycore
POSTGRES_PASSWORD: memorycore_dev
ports:
- "127.0.0.1:5434:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
networks:
- memorycore-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U memorycore"]
interval: 10s
timeout: 5s
retries: 5
# Redis for working memory
redis:
image: redis:7-alpine
container_name: memorycore-redis
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru --requirepass ${REDIS_PASSWORD:-memorycore_redis_dev}
ports:
- "127.0.0.1:6380:6379"
volumes:
- redis-data:/data
networks:
- memorycore-network
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-memorycore_redis_dev}", "ping"]
interval: 10s
timeout: 5s
retries: 5
# MemoryCore API (development)
api:
build:
context: .
dockerfile: Dockerfile
container_name: memorycore-api
environment:
NODE_ENV: development
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: memorycore
POSTGRES_USER: memorycore
POSTGRES_PASSWORD: memorycore_dev
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-memorycore_redis_dev}
PORT: 3002
JWT_SECRET: ${JWT_SECRET:-dev-secret-key-change-in-production}
ports:
- "127.0.0.1:3007:3002"
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- ./tsconfig.json:/app/tsconfig.json
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- memorycore-network
command: npm run dev
volumes:
postgres-data:
redis-data:
networks:
memorycore-network:
driver: bridge