diff --git a/apps/openpanel/25.6.5.41-alpine/config/clickhouse-config.xml b/apps/openpanel/25.6.5.41-alpine/config/clickhouse-config.xml new file mode 100644 index 000000000..659577864 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/config/clickhouse-config.xml @@ -0,0 +1,29 @@ + + + warning + true + + + 10 + + + + + + + + + + + + 0.0.0.0 + 0.0.0.0 + op-ch + + + + 1 + replica1 + openpanel_cluster + + diff --git a/apps/openpanel/25.6.5.41-alpine/config/clickhouse-user-config.xml b/apps/openpanel/25.6.5.41-alpine/config/clickhouse-user-config.xml new file mode 100644 index 000000000..ae6a6b948 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/config/clickhouse-user-config.xml @@ -0,0 +1,8 @@ + + + + 0 + 0 + + + \ No newline at end of file diff --git a/apps/openpanel/25.6.5.41-alpine/config/init-db.sh b/apps/openpanel/25.6.5.41-alpine/config/init-db.sh new file mode 100644 index 000000000..e86d8af32 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/config/init-db.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +clickhouse client -n <<-EOSQL + CREATE DATABASE IF NOT EXISTS openpanel; +EOSQL \ No newline at end of file diff --git a/apps/openpanel/25.6.5.41-alpine/data.yml b/apps/openpanel/25.6.5.41-alpine/data.yml new file mode 100644 index 000000000..23c435d68 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/data.yml @@ -0,0 +1,148 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_POSTGRES_SERVICE + required: true + type: service + default: postgresql + envKey: PANEL_POSTGRES_TYPE + labelZh: Postgres 服务 (前置检查) + labelEn: Postgres Service (Pre-check) + required: false + type: apps + values: + - label: PostgreSQL + value: postgresql + - child: + default: "" + envKey: PANEL_REDIS_SERVICE + required: true + type: service + default: redis + envKey: PANEL_REDIS_TYPE + labelZh: Redis 服务 (前置检查) + labelEn: Redis Service (Pre-check) + required: true + type: apps + values: + - label: Redis + value: redis + - default: "/home/clickhouse-server" + edit: true + envKey: CLICKHOUSE_SERVER_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 8123 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: 9000 + edit: true + envKey: PANEL_APP_PORT_NATIVE_TCP + labelZh: Native/TCP 通讯端口 + labelEn: Native/TCP interface + required: true + rule: paramPort + type: number + - default: 9009 + edit: true + envKey: PANEL_APP_PORT_INTER_SERVER + labelZh: 服务器通信端口 + labelEn: Inter-server communication + required: true + rule: paramPort + type: number + - default: "http://127.0.0.1:8123/openpanel" + edit: true + envKey: CLICKHOUSE_URL + labelZh: ClickHouse 访问地址 + labelEn: ClickHouse URL + required: true + type: text + - default: "redis://127.0.0.1:6379" + edit: true + envKey: REDIS_URL + labelZh: Redis 地址 + labelEn: Redis Url + required: true + type: text + - default: "postgresql://postgres_user:postgres_pass@127.0.0.1:5432/postgres_db_name?schema=public" + edit: true + envKey: DATABASE_URL + labelZh: Redis 地址 + labelEn: Redis Url + required: true + type: text + - default: "false" + edit: true + envKey: ALLOW_REGISTRATION + labelZh: 开放注册 + labelEn: Open Registration + required: true + type: select + values: + - label: 允许注册 + value: "true" + - label: 禁止注册 + value: "false" + - default: "false" + edit: true + envKey: ALLOW_INVITATION + labelZh: 开放邀请 + labelEn: Open Invitation + required: true + type: select + values: + - label: 允许邀请 + value: "true" + - label: 禁止邀请 + value: "false" + - default: "" + edit: true + envKey: RESEND_API_KEY + labelZh: 邮件发送 (Resend) API KEY + labelEn: Email (Resend) Send API KEY + required: false + type: text + - default: "" + edit: true + envKey: EMAIL_SENDER + labelZh: 邮件发送者地址 + labelEn: Email Sender Address + required: false + type: text + - default: "" + edit: true + envKey: GITHUB_CLIENT_ID + labelZh: Github 客户端 ID (OAuth2) + labelEn: Github Client ID (OAuth2) + required: false + type: text + - default: "" + edit: true + envKey: GITHUB_CLIENT_SECRET + labelZh: Github 客户端密钥 (OAuth2) + labelEn: Github Client Secret (OAuth2) + required: false + type: text + - default: "" + edit: true + envKey: GOOGLE_CLIENT_ID + labelZh: Google 客户端 ID (OAuth2) + labelEn: Google Client ID (OAuth2) + required: false + type: text + - default: "" + edit: true + envKey: GOOGLE_CLIENT_SECRET + labelZh: Google 客户端密钥 (OAuth2) + labelEn: Google Client Secret (OAuth2) + required: false + type: text diff --git a/apps/openpanel/25.6.5.41-alpine/docker-compose.yml b/apps/openpanel/25.6.5.41-alpine/docker-compose.yml new file mode 100644 index 000000000..92fed07f5 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/docker-compose.yml @@ -0,0 +1,42 @@ +networks: + 1panel-network: + external: true + +services: + clickhouse-server: + image: clickhouse/clickhouse-server:25.6.5.41-alpine + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ulimits: + nofile: + soft: 262144 + hard: 262144 + ports: + - ${PANEL_APP_PORT_HTTP}:8123 + - ${PANEL_APP_PORT_NATIVE_TCP}:9000 + - ${PANEL_APP_PORT_INTER_SERVER}:9009 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${CLICKHOUSE_SERVER_ROOT_PATH}/data:/var/lib/clickhouse + - ${CLICKHOUSE_SERVER_ROOT_PATH}/logs:/var/log/clickhouse-server + - ${CLICKHOUSE_SERVER_ROOT_PATH}/config/op-config.xml:/etc/clickhouse-server/config.d/op-config.xml + - ${CLICKHOUSE_SERVER_ROOT_PATH}/config/op-user-config.xml:/etc/clickhouse-server/users.d/op-user-config.xml + - ${CLICKHOUSE_SERVER_ROOT_PATH}/config/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh + environment: + - TZ=Asia/Shanghai + - DATABASE_URL_DIRECT=${DATABASE_URL} + - BATCH_SIZE=5000 + - BATCH_INTERVAL=10000 + - CONCURRENCY=10 + - WORKER_PORT=9999 + - API_PORT=3333 + - NEXT_PUBLIC_API_URL="http://localhost:3333" + - NEXT_PUBLIC_DASHBOARD_URL="http://localhost:3000" + - GITHUB_REDIRECT_URI=https://openpanel.domain.com/api/oauth/github/callback + - GOOGLE_REDIRECT_URI=https://openpanel.domain.com/api/oauth/google/callback diff --git a/apps/openpanel/25.6.5.41-alpine/envs/default.env b/apps/openpanel/25.6.5.41-alpine/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/openpanel/25.6.5.41-alpine/envs/global.env b/apps/openpanel/25.6.5.41-alpine/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/openpanel/25.6.5.41-alpine/scripts/init.sh b/apps/openpanel/25.6.5.41-alpine/scripts/init.sh new file mode 100644 index 000000000..80c647873 --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/scripts/init.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + if [ ! -d $CLICKHOUSE_SERVER_ROOT_PATH/config ]; then + mkdir -p $CLICKHOUSE_SERVER_ROOT_PATH/config + fi + cp -rn ./config/* $CLICKHOUSE_SERVER_ROOT_PATH/config/ + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/openpanel/25.6.5.41-alpine/scripts/uninstall.sh b/apps/openpanel/25.6.5.41-alpine/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/openpanel/25.6.5.41-alpine/scripts/upgrade.sh b/apps/openpanel/25.6.5.41-alpine/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/openpanel/25.6.5.41-alpine/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/openpanel/README.md b/apps/openpanel/README.md new file mode 100644 index 000000000..c18c4d704 --- /dev/null +++ b/apps/openpanel/README.md @@ -0,0 +1,50 @@ +# Openpanel + +Openpanel 是一个开源网络和产品分析平台,它结合了 Mixpanel 的强大功能和 Plausible 的易用性,是最好的 Google Analytics +替代品之一。 + +![Openpanel](https://file.lifebus.top/imgs/openpanel_cover.png) + +![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) + +## 特性 + +### 网络分析 + ++ 实时数据 :实时查看访客活动 ++ 流量来源 :了解访客来自哪里 ++ 地理洞察 :追踪访客位置和趋势 ++ 设备分析 :监控不同设备的使用情况 ++ 页面性能 :分析访问量最大的页面 + +### 产品分析 + ++ 事件跟踪 :监控用户操作和交互 ++ 用户资料 :建立详细的用户旅程洞察 ++ 漏斗 :分析转化路径 ++ 留存率 :跟踪用户参与度 ++ 自定义属性 :为事件添加上下文 + +## 快速开始 SDK + +### 脚本标签 + +```html + + + +``` + +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/apps/openpanel/data.yml b/apps/openpanel/data.yml new file mode 100644 index 000000000..ecb0a43fb --- /dev/null +++ b/apps/openpanel/data.yml @@ -0,0 +1,14 @@ +additionalProperties: + key: openpanel + name: Openpanel + tags: + - WebSite + - Local + shortDescZh: 开源网络和产品分析平台 + shortDescEn: An open source network and product analysis platform + type: website + crossVersionUpdate: true + limit: 0 + website: https://openpanel.dev/ + github: https://github.com/Openpanel-dev/openpanel/ + document: https://openpanel.dev/ diff --git a/apps/openpanel/logo.png b/apps/openpanel/logo.png new file mode 100644 index 000000000..827e9529e Binary files /dev/null and b/apps/openpanel/logo.png differ