Merge pull request #9070 from okxlin/renovate/ghcr.io-anomalyco-opencode-2.x

Update ghcr.io/anomalyco/opencode Docker tag to v2.3.2
This commit is contained in:
github-actions[bot]
2026-11-18 04:05:16 +00:00
committed by GitHub
6 changed files with 171 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
CONTAINER_NAME=opencode-compose-check
PANEL_APP_PORT_HTTP=4096
APP_DATA_DIR=./data
OPENCODE_SERVER_USERNAME=opencode
OPENCODE_SERVER_PASSWORD=change-me-before-deploy
TZ=Asia/Shanghai
+86
View File
@@ -0,0 +1,86 @@
additionalProperties:
formFields:
- default: 4096
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Web Port
labelZh: Web 端口
label:
en: Web Port
zh: Web 端口
zh-Hant: Web 連接埠
ja: Web ポート
ko: 웹 포트
ru: Веб-порт
ms: Port Web
pt-br: Porta Web
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: APP_DATA_DIR
labelEn: Data Directory
labelZh: 数据目录
label:
en: Data Directory
zh: 数据目录
zh-Hant: 資料目錄
ja: データディレクトリ
ko: 데이터 디렉터리
ru: Каталог данных
ms: Direktori Data
pt-br: Diretório de Dados
required: true
type: text
- default: opencode
edit: true
envKey: OPENCODE_SERVER_USERNAME
labelEn: Server Username
labelZh: 服务器用户名
label:
en: Server Username
zh: 服务器用户名
zh-Hant: 伺服器使用者名稱
ja: サーバーユーザー名
ko: 서버 사용자 이름
ru: Имя пользователя сервера
ms: Nama Pengguna Pelayan
pt-br: Nome de Usuario do Servidor
required: true
rule: paramCommon
type: text
- default: ''
edit: true
envKey: OPENCODE_SERVER_PASSWORD
labelEn: Server Password
labelZh: 服务器密码
label:
en: Server Password
zh: 服务器密码
zh-Hant: 伺服器密碼
ja: サーバーパスワード
ko: 서버 비밀번호
ru: Пароль сервера
ms: Kata Laluan Pelayan
pt-br: Senha do Servidor
random: true
required: true
rule: paramComplexity
type: password
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Timezone
labelZh: 时区
label:
en: Timezone
zh: 时区
zh-Hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon Waktu
pt-br: Fuso Horário
required: true
type: text
+35
View File
@@ -0,0 +1,35 @@
services:
opencode:
image: "ghcr.io/anomalyco/opencode:2.3.2"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
user: "1000:1000"
command: ["serve", "--hostname", "0.0.0.0", "--port", "4096"]
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:4096"
volumes:
- "${APP_DATA_DIR}:/home/opencode"
environment:
- HOME=/home/opencode
- OPENCODE_SERVER_USERNAME=${OPENCODE_SERVER_USERNAME}
- OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD}
- TZ=${TZ}
stop_grace_period: 15s
healthcheck:
test:
- CMD-SHELL
- >-
auth="$$(printf '%s:%s' "$${OPENCODE_SERVER_USERNAME}" "$${OPENCODE_SERVER_PASSWORD}" | base64 | tr -d '\n')";
wget -q -O /dev/null --header "Authorization: Basic $$auth" http://127.0.0.1:4096/global/health
interval: 1m
timeout: 5s
retries: 5
start_period: 20s
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ENV_FILE="${ENV_FILE:-$ROOT_DIR/.env}"
read_env_value() {
local value=""
[[ -f "$ENV_FILE" ]] || return 0
value="$(sed -n "s/^APP_DATA_DIR=//p" "$ENV_FILE" | tail -n 1)"
value="${value#\"}"
value="${value%\"}"
value="${value#\'}"
value="${value%\'}"
printf '%s\n' "$value"
}
data_dir_value="${APP_DATA_DIR:-$(read_env_value)}"
data_dir_value="${data_dir_value:-./data}"
data_dir_is_absolute=false
case "$data_dir_value" in
/) echo "refusing to use / as APP_DATA_DIR" >&2; exit 1 ;;
/*) data_dir="$data_dir_value"; data_dir_is_absolute=true ;;
*) data_dir="$ROOT_DIR/${data_dir_value#./}" ;;
esac
data_dir="$(readlink -f -- "$data_dir")"
case "$data_dir" in
/) echo "refusing to use / as APP_DATA_DIR" >&2; exit 1 ;;
esac
if [[ "$data_dir_is_absolute" == false && "$data_dir" != "$ROOT_DIR/"* ]]; then
echo "refusing relative APP_DATA_DIR outside the app directory" >&2
exit 1
fi
mkdir -p -- "$data_dir"
chown -R 1000:1000 -- "$data_dir"
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
exec bash "$SCRIPT_DIR/init.sh"