Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
153 lines (145 loc) · 4.93 KB
/
Copy pathcompose.yaml
File metadata and controls
153 lines (145 loc) · 4.93 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: aegisflow
services:
postgres:
image: pgvector/pgvector:pg16@sha256:a36250871de0833b8757561c72f2477ef1ddd1101afa4e617fb552e0de514c6b
environment:
POSTGRES_USER: ${POSTGRES_USER:?POSTGRES_USER is required}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
POSTGRES_DB: ${POSTGRES_DB:?POSTGRES_DB is required}
ports:
- "127.0.0.1:${POSTGRES_HOST_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
redis:
image: redis:7-alpine@sha256:e7723ff73d963f5cc6d9c4643ea3d989527a402a319239054e9472a7fb9219a2
ports:
- "127.0.0.1:${REDIS_HOST_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
temporal-postgres:
image: postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
environment:
POSTGRES_USER: temporal
POSTGRES_PASSWORD: temporal-development-only
POSTGRES_DB: temporal
volumes:
- temporal_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U temporal -d temporal"]
interval: 5s
timeout: 5s
retries: 10
temporal:
image: temporalio/auto-setup:1.29.1@sha256:5b3502a3b685f9eff1b925af90c57c9e3dbeccbef367cc28a2a9712c63379312
environment:
DB: postgres12
DB_PORT: 5432
POSTGRES_USER: temporal
POSTGRES_PWD: temporal-development-only
POSTGRES_SEEDS: temporal-postgres
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_CLI_ADDRESS: temporal:7233
ports:
- "127.0.0.1:${TEMPORAL_HOST_PORT:-7233}:7233"
depends_on:
temporal-postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "tctl", "--address", "temporal:7233", "cluster", "health"]
interval: 5s
timeout: 5s
retries: 20
start_period: 20s
core:
build:
context: .
dockerfile: Dockerfile
target: runtime
environment:
APP_ENV: ${APP_ENV:?APP_ENV is required}
APP_BASE_URL: ${APP_BASE_URL:-}
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:?POSTGRES_USER is required}:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}@postgres:5432/${POSTGRES_DB:?POSTGRES_DB is required}
SANDBOX_BROKER_URL: http://sandbox-broker:8081
ports:
- "127.0.0.1:${CORE_HOST_PORT:-8000}:8000"
volumes:
- sandbox_workspaces:/workspaces
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
sandbox-broker:
condition: service_healthy
healthcheck:
test:
- CMD
- python
- -c
- >-
import json, urllib.request; response = urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3); assert response.status == 200; assert json.load(response) == {'status': 'ok', 'service': 'aegisflow-core'}
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
temporal-worker:
build:
context: .
dockerfile: Dockerfile
target: temporal-worker
environment:
APP_ENV: ${APP_ENV:?APP_ENV is required}
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:?POSTGRES_USER is required}:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}@postgres:5432/${POSTGRES_DB:?POSTGRES_DB is required}
LANGGRAPH_DATABASE_URL: postgresql://${POSTGRES_USER:?POSTGRES_USER is required}:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}@postgres:5432/${POSTGRES_DB:?POSTGRES_DB is required}
LANGGRAPH_STRICT_MSGPACK: "true"
TEMPORAL_ADDRESS: temporal:7233
TEMPORAL_NAMESPACE: ${TEMPORAL_NAMESPACE:-default}
TEMPORAL_TASK_QUEUE: ${TEMPORAL_TASK_QUEUE:-aegisflow-delivery}
depends_on:
postgres:
condition: service_healthy
temporal:
condition: service_healthy
healthcheck:
test:
- CMD
- python
- -c
- >-
import asyncio, os; from temporalio.client import Client; asyncio.run(Client.connect(os.environ['TEMPORAL_ADDRESS']))
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
sandbox-broker:
build:
context: .
dockerfile: Dockerfile
target: sandbox-broker
environment:
SANDBOX_WORKSPACE_ROOT: /workspaces
group_add:
- ${DOCKER_SOCKET_GID:-0}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- sandbox_workspaces:/workspaces
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; assert urllib.request.urlopen('http://127.0.0.1:8081/openapi.json', timeout=3).status == 200"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
volumes:
postgres_data:
temporal_postgres_data:
sandbox_workspaces: