Repository navigation
Expand file tree
/
Copy pathprocess-compose.yml
More file actions
122 lines (118 loc) · 3.97 KB
/
Copy pathprocess-compose.yml
File metadata and controls
122 lines (118 loc) · 3.97 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
version: "0.5"
is_strict: true
shell:
shell_command: "sh"
# Not a login shell: on macOS a login sh runs /etc/profile, which calls
# path_helper and moves the system directories ahead of the user's own
# PATH. The daemon started here hands its environment to every agent it
# launches, so keep the PATH process-compose was started with.
shell_argument: "-c"
processes:
git-fetch:
description: "Refresh remote refs every 15 minutes while on main"
namespace: dev
log_location: "tmp/logs/git-fetch-process-compose.log"
command: |
while true; do
if [ "$(git branch --show-current)" = "main" ]; then
git fetch || echo "git fetch failed; retrying in 15 minutes" >&2
fi
sleep 900
done
backend:
description: "Go backend with live reload on 127.0.0.1:8091"
namespace: dev
log_location: "tmp/logs/backend-process-compose.log"
command: |
mkdir -p tmp/logs
export KENN_FORGE_LOG_LEVEL="${KENN_FORGE_LOG_LEVEL:-debug}"
export KENN_FORGE_LOG_FILE="${KENN_FORGE_LOG_FILE:-tmp/logs/backend-dev.log}"
export KENN_FORGE_LOG_STDERR_LEVEL="${KENN_FORGE_LOG_STDERR_LEVEL:-info}"
export KENN_FORGE_DEV_RESTART=1
if ! make frontend || ! ./scripts/dev-backend-build.sh; then
[ -x ./tmp/kenn-forge ] || exit 1
printf 'Build failed; running the last successful backend build\n' >&2
fi
if [ -n "${KENN_FORGE_CONFIG:-}" ]; then
exec ./tmp/kenn-forge serve -config "$KENN_FORGE_CONFIG" ${BACKEND_ARGS:-}
else
exec ./tmp/kenn-forge serve ${BACKEND_ARGS:-}
fi
watch:
debounce: 1s
paths:
# A pull can change only documentation; watch the checkout revision too.
- path: ./.git
include: ["HEAD", "logs/HEAD"]
exclude: ["objects/**", "refs/**", "logs/refs/**", "worktrees/**", "modules/**", "lfs/**"]
- path: ./cmd
include: ["*.go", "*.tpl", "*.tmpl", "*.html"]
- path: ./internal
include: ["*.go", "*.tpl", "*.tmpl", "*.html"]
exclude: ["web/dist/**", "apiclient/*/client.go"]
- path: ./githubapp
include: ["*.go"]
- path: ./landedwork
include: ["*.go"]
- path: ./platform
include: ["*.go"]
- path: ./worklist
include: ["*.go"]
# File watches traverse their parent; prune local worktrees and caches.
- path: ./go.mod
exclude: [".*/**", "tmp/**"]
- path: ./go.sum
exclude: [".*/**", "tmp/**"]
- path: ./scripts/dev-backend-build.sh
availability:
restart: always
backoff_seconds: 5
shutdown:
signal: 15
timeout_seconds: 150
# process-compose kills the backend when readiness exhausts its failures.
# The first start after a pull runs the frontend build and a cold Go build
# before the server listens, which can take several minutes.
readiness_probe:
http_get:
host: 127.0.0.1
scheme: http
path: /healthz
port: 8091
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 3
success_threshold: 1
failure_threshold: 120
frontend:
description: "Vite frontend dev server on 127.0.0.1:5174"
namespace: dev
log_location: "tmp/logs/frontend-process-compose.log"
environment:
- KENN_FORGE_API_ERROR_DEBUG=1
command: "exec sh ./scripts/dev-stack-frontend.sh"
watch:
debounce: 1s
paths:
- path: ./bun.lock
exclude: [".*/**", "tmp/**"]
- path: ./package.json
exclude: [".*/**", "tmp/**"]
- path: ./frontend/package.json
availability:
restart: always
backoff_seconds: 5
shutdown:
signal: 2
timeout_seconds: 10
readiness_probe:
http_get:
host: 127.0.0.1
scheme: http
path: /
port: 5174
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 3
success_threshold: 1
failure_threshold: 120