From 87f1018a095a9796bebed2b1c74fbcfb634454b7 Mon Sep 17 00:00:00 2001 From: github-action update-app-version Date: Sat, 14 Nov 2026 02:31:31 +0000 Subject: [PATCH] Update app version [skip ci] --- apps/codex2api/3.1.4/docker-compose.yml | 2 +- apps/codex2api/3.1.5/docker-compose.yml | 2 +- apps/codex2api/3.1.6/.env.sample | 5 ++ apps/codex2api/3.1.6/data.yml | 77 +++++++++++++++++++++++ apps/codex2api/3.1.6/docker-compose.yml | 37 +++++++++++ apps/codex2api/3.1.6/scripts/init.sh | 40 ++++++++++++ apps/codex2api/3.1.6/scripts/uninstall.sh | 5 ++ apps/codex2api/3.1.6/scripts/upgrade.sh | 5 ++ 8 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 apps/codex2api/3.1.6/.env.sample create mode 100644 apps/codex2api/3.1.6/data.yml create mode 100644 apps/codex2api/3.1.6/docker-compose.yml create mode 100755 apps/codex2api/3.1.6/scripts/init.sh create mode 100755 apps/codex2api/3.1.6/scripts/uninstall.sh create mode 100755 apps/codex2api/3.1.6/scripts/upgrade.sh diff --git a/apps/codex2api/3.1.4/docker-compose.yml b/apps/codex2api/3.1.4/docker-compose.yml index f129aba71..1600d1143 100644 --- a/apps/codex2api/3.1.4/docker-compose.yml +++ b/apps/codex2api/3.1.4/docker-compose.yml @@ -1,6 +1,6 @@ services: codex2api: - image: "ghcr.io/james-6-23/codex2api:3.1.6@sha256:135df508eb7e5b959fdf0bb56c397ea98c902cbf2c983a5280123b1e600f5780" + image: "ghcr.io/james-6-23/codex2api:3.1.4@sha256:705cde823ad9a2d6ed4038b4ea844f63e6e9064dea6bd99f619fb8f2e5c6ae3e" container_name: ${CONTAINER_NAME} restart: always security_opt: diff --git a/apps/codex2api/3.1.5/docker-compose.yml b/apps/codex2api/3.1.5/docker-compose.yml index f129aba71..f72ed6dde 100644 --- a/apps/codex2api/3.1.5/docker-compose.yml +++ b/apps/codex2api/3.1.5/docker-compose.yml @@ -1,6 +1,6 @@ services: codex2api: - image: "ghcr.io/james-6-23/codex2api:3.1.6@sha256:135df508eb7e5b959fdf0bb56c397ea98c902cbf2c983a5280123b1e600f5780" + image: "ghcr.io/james-6-23/codex2api:3.1.5@sha256:7e8ea88afd419af4d3515055559c124802c74c74a10f7eade8998b5a281ef2a0" container_name: ${CONTAINER_NAME} restart: always security_opt: diff --git a/apps/codex2api/3.1.6/.env.sample b/apps/codex2api/3.1.6/.env.sample new file mode 100644 index 000000000..cfba7808e --- /dev/null +++ b/apps/codex2api/3.1.6/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME=1Panel-localcodex2api +PANEL_APP_PORT_HTTP=40167 +ADMIN_SECRET=replace-with-a-strong-random-admin-secret +TZ=Asia/Shanghai +APP_DATA_DIR=./data diff --git a/apps/codex2api/3.1.6/data.yml b/apps/codex2api/3.1.6/data.yml new file mode 100644 index 000000000..bfcf5795f --- /dev/null +++ b/apps/codex2api/3.1.6/data.yml @@ -0,0 +1,77 @@ +additionalProperties: + formFields: + - default: 40167 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web 端口 + label: + en: Web Port + es-es: Puerto web + ja: Web ポート + ms: Port Web + pt-br: Porta web + ru: Веб-порт + ko: 웹 포트 + zh-Hant: Web 連接埠 + zh: Web 端口 + tr: Web Portu + required: true + rule: paramPort + type: number + - default: codex2api + edit: true + envKey: ADMIN_SECRET + labelEn: Admin Secret + labelZh: 管理密钥 + label: + en: Admin Secret + es-es: Secreto de administrador + ja: 管理者シークレット + ms: Rahsia Pentadbir + pt-br: Segredo do administrador + ru: Секрет администратора + ko: 관리자 비밀 키 + zh-Hant: 管理密鑰 + zh: 管理密钥 + tr: Yönetici Sırrı + random: true + required: true + rule: paramComplexity + type: password + - default: Asia/Shanghai + edit: true + envKey: TZ + labelEn: Timezone + labelZh: 时区 + label: + en: Timezone + es-es: Zona horaria + ja: タイムゾーン + ms: Zon waktu + pt-br: Fuso horário + ru: Часовой пояс + ko: 시간대 + zh-Hant: 時區 + zh: 时区 + tr: Saat Dilimi + required: true + type: text + - default: ./data + edit: true + envKey: APP_DATA_DIR + labelEn: Data Directory + labelZh: 数据目录 + label: + en: Data Directory + es-es: Directorio de datos + ja: データディレクトリ + ms: Direktori Data + pt-br: Diretório de dados + ru: Каталог данных + ko: 데이터 디렉터리 + zh-Hant: 資料目錄 + zh: 数据目录 + tr: Veri Dizini + required: true + type: text diff --git a/apps/codex2api/3.1.6/docker-compose.yml b/apps/codex2api/3.1.6/docker-compose.yml new file mode 100644 index 000000000..f129aba71 --- /dev/null +++ b/apps/codex2api/3.1.6/docker-compose.yml @@ -0,0 +1,37 @@ +services: + codex2api: + image: "ghcr.io/james-6-23/codex2api:3.1.6@sha256:135df508eb7e5b959fdf0bb56c397ea98c902cbf2c983a5280123b1e600f5780" + container_name: ${CONTAINER_NAME} + restart: always + security_opt: + - no-new-privileges:true + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + environment: + - CODEX_PORT=8080 + - CODEX_BIND=0.0.0.0 + - ADMIN_SECRET=${ADMIN_SECRET} + - CODEX_ALLOW_ANONYMOUS=false + - DATABASE_DRIVER=sqlite + - CACHE_DRIVER=memory + - DATABASE_PATH=/data/codex2api.db + - IMAGE_ASSET_DIR=/data/images + - LOG_DIR=/app/logs + - TZ=${TZ} + volumes: + - "${APP_DATA_DIR}/data:/data" + - "${APP_DATA_DIR}/logs:/app/logs" + healthcheck: + test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:8080/health"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 30s + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/codex2api/3.1.6/scripts/init.sh b/apps/codex2api/3.1.6/scripts/init.sh new file mode 100755 index 000000000..9f1d14f0c --- /dev/null +++ b/apps/codex2api/3.1.6/scripts/init.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" +ENV_FILE="${ENV_FILE:-${ROOT_DIR}/.env}" + +read_env() { + local value + + value="$(sed -n "s/^${1}=//p" "$ENV_FILE" | tail -n 1)" + if [[ ${#value} -ge 2 && "${value:0:1}" == "${value: -1}" && "${value:0:1}" =~ [\"\'] ]]; then + value="${value:1:${#value}-2}" + fi + printf '%s\n' "$value" +} + +[[ -f "$ENV_FILE" && ! -L "$ENV_FILE" ]] || { + printf '%s\n' "$ENV_FILE must be a regular file" >&2 + exit 1 +} + +DATA_DIR="$(read_env APP_DATA_DIR)" +DATA_DIR="${DATA_DIR:-./data}" +case "$DATA_DIR" in + /*) DATA_DIR="$(realpath -m -- "$DATA_DIR")" ;; + *) + DATA_DIR="$(realpath -m -- "${ROOT_DIR}/${DATA_DIR#./}")" + [[ "$DATA_DIR" == "$ROOT_DIR" || "$DATA_DIR" == "$ROOT_DIR/"* ]] || { + printf '%s\n' "Relative APP_DATA_DIR must stay inside the application directory" >&2 + exit 1 + } + ;; +esac + +[[ "$DATA_DIR" != / ]] || { + printf '%s\n' "APP_DATA_DIR must not be the filesystem root" >&2 + exit 1 +} + +mkdir -p "$DATA_DIR/data" "$DATA_DIR/logs" diff --git a/apps/codex2api/3.1.6/scripts/uninstall.sh b/apps/codex2api/3.1.6/scripts/uninstall.sh new file mode 100755 index 000000000..e0d150955 --- /dev/null +++ b/apps/codex2api/3.1.6/scripts/uninstall.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +# 1Panel owns application data removal according to the user's uninstall choice. +exit 0 diff --git a/apps/codex2api/3.1.6/scripts/upgrade.sh b/apps/codex2api/3.1.6/scripts/upgrade.sh new file mode 100755 index 000000000..4fa25baf7 --- /dev/null +++ b/apps/codex2api/3.1.6/scripts/upgrade.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +"$SCRIPT_DIR/init.sh"