-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
89 lines (84 loc) · 2.22 KB
/
compose.yaml
File metadata and controls
89 lines (84 loc) · 2.22 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fluent
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- fluent-pgdata:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d fluent"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: ${API_CONTEXT:-../fluent-api}
dockerfile: Dockerfile.dev
ports:
- "${API_PORT:-9999}:9999"
volumes:
- ${API_CONTEXT:-../fluent-api}:/app
- /app/node_modules
env_file: ${API_CONTEXT:-../fluent-api}/.env
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/fluent
command: sh docker-entrypoint.sh
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9999/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
worker:
build:
context: ${API_CONTEXT:-../fluent-api}
dockerfile: Dockerfile.dev
volumes:
- ${API_CONTEXT:-../fluent-api}:/app
- /app/node_modules
env_file: ${API_CONTEXT:-../fluent-api}/.env
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/fluent
command: npx tsx watch src/workers/standalone-worker.ts
depends_on:
api:
condition: service_healthy
ai:
build:
context: ${AI_CONTEXT:-../fluent-ai}
dockerfile: Dockerfile.dev
ports:
- "${AI_PORT:-8888}:8888"
volumes:
- ${AI_CONTEXT:-../fluent-ai}:/app
- /app/node_modules
env_file: ${AI_CONTEXT:-../fluent-ai}/.env
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/fluent
depends_on:
api:
condition: service_healthy
web:
build:
context: ${WEB_CONTEXT:-../fluent-web}
dockerfile: Dockerfile.dev
ports:
- "${WEB_PORT:-3000}:3000"
volumes:
- ${WEB_CONTEXT:-../fluent-web}:/app
- /app/node_modules
environment:
VITE_API_URL: "http://localhost:${API_PORT:-9999}"
depends_on:
api:
condition: service_healthy
volumes:
fluent-pgdata: