Skip to content

Commit 9dfdfd9

Browse files
Make boundary http proxy port configurable
1 parent 19cdadb commit 9dfdfd9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

registry/coder/modules/claude-code/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ variable "boundary_additional_allowed_urls" {
210210
default = []
211211
}
212212

213+
variable "boundary_proxy_port" {
214+
type = string
215+
description = "Port for HTTP Proxy used by Boundary"
216+
default = "8087"
217+
}
218+
213219
resource "coder_env" "claude_code_md_path" {
214220
count = var.claude_md_path == "" ? 0 : 1
215221

@@ -294,6 +300,7 @@ module "agentapi" {
294300
ARG_BOUNDARY_LOG_DIR='${var.boundary_log_dir}' \
295301
ARG_BOUNDARY_ADDITIONAL_ALLOWED_URLS='${join(" ", var.boundary_additional_allowed_urls)}' \
296302
ARG_CODER_HOST='${local.coder_host}' \
303+
ARG_BOUNDARY_PROXY_PORT='${var.boundary_proxy_port}' \
297304
/tmp/start.sh
298305
EOT
299306

registry/coder/modules/claude-code/scripts/start.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ARG_AI_PROMPT=$(echo -n "${ARG_AI_PROMPT:-}" | base64 -d)
1818
ARG_ENABLE_BOUNDARY=${ARG_ENABLE_BOUNDARY:-false}
1919
ARG_BOUNDARY_LOG_DIR=${ARG_BOUNDARY_LOG_DIR:-"/tmp/boundary_logs"}
2020
ARG_CODER_HOST=${ARG_CODER_HOST:-}
21+
ARG_BOUNDARY_PROXY_PORT=${ARG_BOUNDARY_PROXY_PORT:-"8087"}
2122

2223
echo "--------------------------------"
2324

@@ -31,6 +32,7 @@ printf "ARG_WORKDIR: %s\n" "$ARG_WORKDIR"
3132
printf "ARG_ENABLE_BOUNDARY: %s\n" "$ARG_ENABLE_BOUNDARY"
3233
printf "ARG_BOUNDARY_LOG_DIR: %s\n" "$ARG_BOUNDARY_LOG_DIR"
3334
printf "ARG_CODER_HOST: %s\n" "$ARG_CODER_HOST"
35+
printf "ARG_BOUNDARY_PROXY_PORT: %s\n" "$ARG_BOUNDARY_PROXY_PORT"
3436

3537
echo "--------------------------------"
3638

@@ -98,13 +100,14 @@ function start_agentapi() {
98100
done
99101
fi
100102

103+
# Set HTTP Proxy port used by Boundary
104+
BOUNDARY_ARGS+=(--proxy-port $ARG_BOUNDARY_PROXY_PORT)
105+
101106
git clone https://github.com/coder/boundary
102107
cd boundary
103108
git checkout yevhenii/proxy-v3
104109
go install ./cmd/...
105110

106-
BOUNDARY_ARGS+=(--proxy-port=8087)
107-
108111
agentapi server --allowed-hosts="*" --type claude --term-width 67 --term-height 1190 -- \
109112
sudo -E env PATH=$PATH setpriv --inh-caps=+net_admin --ambient-caps=+net_admin --bounding-set=+net_admin /home/coder/go/bin/boundary "${BOUNDARY_ARGS[@]}" -- \
110113
claude

0 commit comments

Comments
 (0)