-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (97 loc) · 2.49 KB
/
docker-compose.yml
File metadata and controls
102 lines (97 loc) · 2.49 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
services:
# Yamix Application (Frontend)
yamix:
build: .
container_name: yamix
ports:
- '${YAMIX_HOST:-127.0.0.1}:${YAMIX_PORT:-3000}:3000'
environment:
DATABASE_URL: postgresql://yamix:${POSTGRES_PASSWORD:-password}@postgres:5432/yamix
REDIS_URL: redis://redis:6379
JWT_SECRET: ${JWT_SECRET}
WEB_URL: ${WEB_URL:-http://localhost:3000}
YAMII_API_URL: http://yamii:8000
YAMII_API_KEY: ${YAMII_API_KEY}
networks:
- internal_network
- external_network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
yamii:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ['CMD', 'node', '-e', "require('http').get('http://127.0.0.1:3000/api/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Yamii API (AI Counseling Backend)
yamii:
build:
context: ./yamii
dockerfile: Dockerfile
container_name: yamii
expose:
- '8000'
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY}
YAMII_API_KEYS: ${YAMII_API_KEY}
YAMII_DATA_DIR: /app/data
networks:
- internal_network
- external_network
volumes:
- yamii_data:/app/data
- ./yamii/config/YAMII.md:/app/config/YAMII.md:ro
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8000/v1/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Database
postgres:
image: postgres:16-alpine
container_name: yamix-postgres
environment:
POSTGRES_USER: yamix
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: yamix
networks:
- internal_network
expose:
- '5432'
volumes:
- ./data/postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U yamix']
interval: 10s
timeout: 5s
retries: 5
# Cache (Valkey - Redis-compatible)
redis:
image: valkey/valkey:8-alpine
container_name: yamix-valkey
networks:
- internal_network
expose:
- '6379'
volumes:
- ./data/redis:/data
healthcheck:
test: ['CMD', 'valkey-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
volumes:
yamii_data:
driver: local
networks:
internal_network:
internal: true
external_network: