mirror of
https://github.com/penpot/penpot.git
synced 2026-06-09 08:52:05 +00:00
📎 Add minor changes to opencode setup
This commit is contained in:
parent
fc038e72fc
commit
e2f96a6ba0
@ -53,10 +53,8 @@ SHADOW_SERVER_URL=wss://localhost:3449
|
||||
# dashboard 24282) are fixed by Serena and mapped to these in compose.
|
||||
SERENA_EXTERNAL_PORT=14181
|
||||
SERENA_DASHBOARD_EXTERNAL_PORT=14182
|
||||
|
||||
# Backend worker (scheduled + async tasks). ws0 only; per-instance overlays
|
||||
# for ws1+ override this to false. See mem:devenv/core.
|
||||
PENPOT_BACKEND_WORKER=true
|
||||
MDTS_EXTERNAL_PORT=14179
|
||||
OPENCODE_EXTERNAL_PORT=14180
|
||||
|
||||
# Tmux session inside the main container.
|
||||
PENPOT_TMUX_ATTACH=true
|
||||
|
||||
@ -35,6 +35,12 @@ services:
|
||||
- ${SERENA_EXTERNAL_PORT}:14281
|
||||
- ${SERENA_DASHBOARD_EXTERNAL_PORT}:24282
|
||||
|
||||
# OpenCode Server
|
||||
- ${OPENCODE_EXTERNAL_PORT}:14180
|
||||
|
||||
# MDTS (Markdown Visualizer)
|
||||
- ${MDTS_EXTERNAL_PORT}:14179
|
||||
|
||||
environment:
|
||||
- EXTERNAL_UID=${CURRENT_USER_ID}
|
||||
- COLORTERM=truecolor
|
||||
@ -77,7 +83,6 @@ services:
|
||||
- PENPOT_OBJECTS_STORAGE_S3_BUCKET=${PENPOT_OBJECTS_STORAGE_S3_BUCKET}
|
||||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||
- PENPOT_BACKEND_WORKER=${PENPOT_BACKEND_WORKER}
|
||||
- PENPOT_TENANT=${PENPOT_TENANT}
|
||||
- PENPOT_TMUX_ATTACH=${PENPOT_TMUX_ATTACH}
|
||||
|
||||
|
||||
@ -48,6 +48,8 @@ PENPOT_PORT_BASE_MCP=${PENPOT_MCP_SERVER_PORT:?missing in defaults.env}
|
||||
PENPOT_PORT_BASE_MCP_REPL=${PENPOT_MCP_REPL_PORT:?missing in defaults.env}
|
||||
PENPOT_PORT_BASE_SERENA=${SERENA_EXTERNAL_PORT:?missing in defaults.env}
|
||||
PENPOT_PORT_BASE_SERENA_DASHBOARD=${SERENA_DASHBOARD_EXTERNAL_PORT:?missing in defaults.env}
|
||||
PENPOT_PORT_BASE_OPENCODE=${OPENCODE_EXTERNAL_PORT:?missing in defaults.env}
|
||||
PENPOT_PORT_BASE_MDTS=${MDTS_EXTERNAL_PORT:?missing in defaults.env}
|
||||
|
||||
# Per-instance values like PENPOT_REDIS_URI are injected by
|
||||
# instance-env-overrides as shell env variables (not set in this shell),
|
||||
@ -310,6 +312,8 @@ function instance-env-overrides {
|
||||
mcp_repl=$(instance-port "$instance" "$PENPOT_PORT_BASE_MCP_REPL")
|
||||
serena=$(instance-port "$instance" "$PENPOT_PORT_BASE_SERENA")
|
||||
serena_dash=$(instance-port "$instance" "$PENPOT_PORT_BASE_SERENA_DASHBOARD")
|
||||
opencode=$(instance-port "$instance" "$PENPOT_PORT_BASE_OPENCODE")
|
||||
mdts=$(instance-port "$instance" "$PENPOT_PORT_BASE_MDTS")
|
||||
printf '%s\n' \
|
||||
"PENPOT_MAIN_CONTAINER_NAME=penpot-devenv-${instance}-main" \
|
||||
"PENPOT_USER_DATA_VOLUME=penpotdev_${instance}_user_data" \
|
||||
@ -320,6 +324,8 @@ function instance-env-overrides {
|
||||
"PENPOT_MCP_SERVER_PORT=${mcp}" \
|
||||
"PENPOT_MCP_REPL_PORT=${mcp_repl}" \
|
||||
"SERENA_EXTERNAL_PORT=${serena}" \
|
||||
"OPENCODE_EXTERNAL_PORT=${opencode}" \
|
||||
"MDTS_EXTERNAL_PORT=${mdts}" \
|
||||
"SERENA_DASHBOARD_EXTERNAL_PORT=${serena_dash}" \
|
||||
"SHADOW_SERVER_URL=wss://localhost:${public_https}" \
|
||||
"PENPOT_TENANT=devenv-${instance}"
|
||||
@ -690,6 +696,7 @@ function print-instance-info {
|
||||
public_https=$(instance-port "$instance" "$PENPOT_PORT_BASE_PUBLIC_HTTPS")
|
||||
mcp=$(instance-port "$instance" "$PENPOT_PORT_BASE_MCP")
|
||||
serena=$(instance-port "$instance" "$PENPOT_PORT_BASE_SERENA")
|
||||
opencode=$(instance-port "$instance" "$PENPOT_PORT_BASE_OPENCODE")
|
||||
serena_dash=$(instance-port "$instance" "$PENPOT_PORT_BASE_SERENA_DASHBOARD")
|
||||
|
||||
# --ws takes a bare integer; ws0 is the default, so its flag is elided.
|
||||
@ -702,6 +709,7 @@ function print-instance-info {
|
||||
echo " Penpot UI: https://localhost:${public_https}"
|
||||
echo " Penpot UI: http://localhost:${public}"
|
||||
echo " MCP stream: http://localhost:${mcp}/mcp"
|
||||
echo " OpenCode Server: http://localhost:${opencode}"
|
||||
echo " Serena MCP: http://localhost:${serena}"
|
||||
echo " Serena dashboard: http://localhost:${serena_dash}"
|
||||
echo " Attach: ./manage.sh attach-devenv${ws_flag}"
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
"fmt": "./scripts/fmt"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@github/copilot": "^1.0.54",
|
||||
"@types/node": "^25.6.2",
|
||||
"@types/node": "^25.9.1",
|
||||
"esbuild": "^0.28.0",
|
||||
"mdts": "^0.20.3",
|
||||
"nrepl-client": "^0.3.0",
|
||||
"opencode-ai": "^1.15.13"
|
||||
"opencode-ai": "^1.16.0"
|
||||
}
|
||||
}
|
||||
|
||||
1260
pnpm-lock.yaml
generated
1260
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
13
scripts/attach-opencode
Executable file
13
scripts/attach-opencode
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
|
||||
PORT=14180
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--port|-p) PORT="$2"; shift 2 ;;
|
||||
*) echo "Unknown option: $1"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
pnpm exec opencode attach "http://localhost:${PORT}";
|
||||
4
scripts/start-mdts-server
Executable file
4
scripts/start-mdts-server
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
pnpm exec mdts --host 0.0.0.0 --port 14179
|
||||
4
scripts/start-opencode
Executable file
4
scripts/start-opencode
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
pnpm exec opencode;
|
||||
4
scripts/start-opencode-server
Executable file
4
scripts/start-opencode-server
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
pnpm exec opencode serve --hostname 0.0.0.0 --port 14180;
|
||||
Loading…
x
Reference in New Issue
Block a user