-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.local.yml
More file actions
87 lines (81 loc) · 3.02 KB
/
Copy pathcompose.local.yml
File metadata and controls
87 lines (81 loc) · 3.02 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
# 本地端到端验证栈(不用于线上部署,线上见 compose.yml)。
#
# 与 compose.yml 的区别:
# - backend/frontend 从本地源码 build(验证本地改动,而非拉 ghcr 镜像)
# - db 数据保存在项目内 .local/postgres-data:普通 `down/up` 保留数据
# - backend 跑 Development 环境:额外暴露 /openapi/v1.json(可 regen 前端 client)
# - 鉴权走真实 Auth 平台(路径甲):AuthService__* 从 .env.local 读,指向线上 auth
# - 前端映射到 127.0.0.1:8080,真机 Agent 把 ApiBaseUrl 指到这里即可闭环
# - 无头 Hub 是默认服务;可选 Collector 从 Hub 管理页按 Catalog 独立安装
#
# 用法见 README「本地端到端验证」。
# 先 `cp .env.local.example .env.local` 并填入真实 Auth 值。
# 与同目录的线上 compose.yml 隔离,避免维护本地数据时误操作线上栈。
name: heartbeat-local
services:
db:
image: postgres:18.4-alpine
environment:
POSTGRES_USER: heartbeat
POSTGRES_PASSWORD: devlocal
POSTGRES_DB: heartbeat
volumes:
# 左侧是 Windows/macOS/Linux 宿主机上的项目目录;右侧是容器内 PostgreSQL 固定路径。
- ./.local/postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U heartbeat"]
interval: 3s
timeout: 3s
retries: 10
networks:
- local
backend:
build:
context: .
dockerfile: server/Dockerfile
depends_on:
db:
condition: service_healthy
environment:
ASPNETCORE_ENVIRONMENT: Development
ConnectionStrings__DefaultConnection: "Host=db;Port=5432;Database=heartbeat;Username=heartbeat;Password=devlocal"
AuthService__Authority: ${AUTH_AUTHORITY}
AuthService__Issuer: ${AUTH_ISSUER:-https://auth.shenxianovo.com}
AuthService__Audience: ${AUTH_AUDIENCE:-https://auth.shenxianovo.com}
AuthService__OidcIssuer: ${AUTH_OIDC_ISSUER:-https://auth.shenxianovo.com/}
AuthService__OidcClientId: ${AUTH_OIDC_CLIENT_ID:-heartbeat-web}
AuthService__OidcAudience: ${AUTH_OIDC_AUDIENCE:-}
Administration__Subjects__0: ${ADMIN_SUBJECT:-}
Recap__BaseUrl: ${RECAP_BASE_URL:-https://api.deepseek.com/v1}
Recap__Model: ${RECAP_MODEL:-deepseek-v4-pro}
Recap__ApiKey: ${RECAP_API_KEY}
Recap__ReasoningEffort: ${RECAP_REASONING_EFFORT:-high}
networks:
- local
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "127.0.0.1:8080:8080"
networks:
- local
headless:
build:
context: .
dockerfile: collection/hub/Heartbeat.Collection.Headless/Dockerfile
environment:
HEARTBEAT_API_BASE_URL: http://backend:8080
volumes:
- type: bind
source: ${HEADLESS_CONFIG_PATH:-./.local/heartbeat-headless.json}
target: /app/heartbeat-headless.json
read_only: true
bind:
create_host_path: false
- ./.local/headless-data:/data
networks:
- local
networks:
local:
driver: bridge