-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (135 loc) · 4.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
141 lines (135 loc) · 4.6 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
# Forge — Docker Compose
#
# No Rust installation required. All you need is Docker and a .env file.
#
# Quick start:
# 1. cp .env.example .env and fill in FORGE_MODEL, FORGE_BASE_URL, FORGE_API_KEY
# 2. Run a one-shot fix:
# docker compose run --rm forge
# Or override the repo/issue inline:
# docker compose run --rm forge run --repo owner/repo --issue 42
# 3. Run continuously (watch mode):
# docker compose up watch
services:
# ── one-shot ──────────────────────────────────────────────────────────────
# Fixes a single issue then exits.
# Set FORGE_REPO and FORGE_ISSUE in .env, or pass them as CLI args.
forge:
image: akachiokey/forge:latest
pull_policy: always
env_file:
- .env
environment:
FORGE_MODEL: ${FORGE_MODEL}
FORGE_BASE_URL: ${FORGE_BASE_URL}
FORGE_API_KEY: ${FORGE_API_KEY}
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
RUST_LOG: ${RUST_LOG:-forge=warn}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./trajectories:/trajectories
group_add:
- "${DOCKER_GID:-999}"
command:
- run
- --repo
- "${FORGE_REPO:-owner/repo}"
- --issue
- "${FORGE_ISSUE:-1}"
- --image
- akachiokey/forge-sandbox:latest
- --output-dir
- /trajectories
restart: "no"
# ── list-issues helper ────────────────────────────────────────────────────
# Scans a repo and prints open issues so you can pick which one to fix.
# Usage: docker compose run --rm list-issues
list-issues:
image: akachiokey/forge:latest
pull_policy: always
env_file:
- .env
environment:
command:
- list-issues
- --repo
- "${FORGE_REPO:-owner/repo}"
restart: "no"
# ── watch (continuous) ────────────────────────────────────────────────────
# Polls the repo every FORGE_WATCH_INTERVAL seconds.
# Issues labelled FORGE_WATCH_LABEL are picked up and fixed automatically.
# Starts on: docker compose up watch
watch:
image: akachiokey/forge:latest
pull_policy: always
env_file:
- .env
environment:
FORGE_MODEL: ${FORGE_MODEL}
FORGE_BASE_URL: ${FORGE_BASE_URL}
FORGE_API_KEY: ${FORGE_API_KEY}
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
FORGE_WATCH_REPO: ${FORGE_WATCH_REPO:-owner/repo}
FORGE_WATCH_LABEL: ${FORGE_WATCH_LABEL:-forge}
FORGE_WATCH_INTERVAL: ${FORGE_WATCH_INTERVAL:-60}
RUST_LOG: ${RUST_LOG:-forge=warn}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./trajectories:/trajectories
group_add:
- "${DOCKER_GID:-999}"
command:
- watch
- --repo
- "${FORGE_WATCH_REPO:-owner/repo}"
- --label
- "${FORGE_WATCH_LABEL:-forge}"
- --interval
- "${FORGE_WATCH_INTERVAL:-60}"
- --image
- akachiokey/forge-sandbox:latest
- --output-dir
- /trajectories
restart: unless-stopped # keeps running; restarts if it crashes
# ── trajectory stats ──────────────────────────────────────────────────────
quick-stats:
image: akachiokey/forge:latest
pull_policy: always
volumes:
- ./trajectories:/trajectories
command:
- quick-stats
- /trajectories
restart: "no"
# ── forge-api (HTTP server for TestSprite / CI integration) ───────────────
# Exposes REST endpoints so tools like TestSprite can send HTTP requests
# without invoking the CLI directly.
#
# Usage:
# docker compose up forge-api
# Then test with:
# curl http://localhost:8080/health
forge-api:
build:
context: .
dockerfile: Dockerfile
args:
BIN: forge-api
env_file:
- .env
environment:
FORGE_MODEL: ${FORGE_MODEL}
FORGE_BASE_URL: ${FORGE_BASE_URL}
FORGE_API_KEY: ${FORGE_API_KEY}
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
RUST_LOG: ${RUST_LOG:-forge_api=info,tower_http=debug}
FORGE_API_PORT: ${FORGE_API_PORT:-5000}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./trajectories:/trajectories
group_add:
- "${DOCKER_GID:-999}"
ports:
- "${FORGE_API_PORT:-5000}:${FORGE_API_PORT:-5000}"
command: []
restart: unless-stopped