mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2025-03-04 00:24:23 +08:00
发布应用 Policr Mini
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
parent
2dce5244c8
commit
0865384697
32
apps/policr-mini/README.md
Normal file
32
apps/policr-mini/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Policr Mini
|
||||
|
||||
专注于验证的 Telegram 机器人
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 简介
|
||||
|
||||
本项目是作为 Policr 机器人的替代品而诞生,最小化的实现了核心功能。
|
||||
|
||||
## 安装说明
|
||||
|
||||
### 服务地址 URL
|
||||
|
||||
用于生成后台链接。如果 /login 命令生成的链接无法访问,可能是此处配置不正确。
|
||||
|
||||
### Bot Token (机器人 Token)
|
||||
|
||||
Telegram 机器人的 Token。
|
||||
|
||||
### Bot Owner ID (机器人所有者 ID)
|
||||
|
||||
用于后台对最高管理员的身份的识别。这里的 ID 不是用户名,是一串数字。
|
||||
|
||||
获取方式:在 Telegram 中,使用 [@userinfobot](https://t.me/userinfobot) 机器人,发送 `/start`,然后发送 `/getid`
|
||||
,然后转发你的消息给机器人,即可获取你的 ID。
|
||||
|
||||
---
|
||||
|
||||

|
14
apps/policr-mini/data.yml
Normal file
14
apps/policr-mini/data.yml
Normal file
@ -0,0 +1,14 @@
|
||||
additionalProperties:
|
||||
key: policr-mini
|
||||
name: Policr Mini
|
||||
tags:
|
||||
- WebSite
|
||||
- Local
|
||||
shortDescZh: 专注于验证的 Telegram 机器人
|
||||
shortDescEn: A Telegram bot focused on verification
|
||||
type: website
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://mini.gramlabs.org/
|
||||
github: https://github.com/Hentioe/policr-mini/
|
||||
document: https://mini.gramlabs.org/
|
112
apps/policr-mini/latest/data.yml
Normal file
112
apps/policr-mini/latest/data.yml
Normal file
@ -0,0 +1,112 @@
|
||||
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: true
|
||||
type: apps
|
||||
values:
|
||||
- label: PostgreSQL
|
||||
value: postgresql
|
||||
- default: "/home/policr-mini"
|
||||
edit: true
|
||||
envKey: POLICR_MINI_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 8080
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "http://127.0.0.1:8080"
|
||||
edit: true
|
||||
envKey: POLICR_MINI_SERVER_ROOT_URL
|
||||
labelZh: 服务地址 URL
|
||||
labelEn: Service address URL
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: POLICR_MINI_SERVER_SECRET_KEY_BASE
|
||||
labelZh: 服务密钥
|
||||
labelEn: Service secret key
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: POLICR_MINI_BOT_TOKEN
|
||||
labelZh: 机器人 Token
|
||||
labelEn: Bot Token
|
||||
required: true
|
||||
type: text
|
||||
- default: "Policr Mini"
|
||||
edit: true
|
||||
envKey: POLICR_MINI_BOT_NAME
|
||||
labelZh: 机器人名称
|
||||
labelEn: Bot name
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: POLICR_MINI_BOT_OWNER_ID
|
||||
labelZh: 机器人所有者 ID
|
||||
labelEn: Bot owner ID
|
||||
required: true
|
||||
type: text
|
||||
- default: "127.0.0.1"
|
||||
edit: true
|
||||
envKey: POSTGRES_HOST
|
||||
labelZh: 数据库 主机地址
|
||||
labelEn: Database Host
|
||||
required: true
|
||||
type: text
|
||||
- default: 5432
|
||||
edit: true
|
||||
envKey: POSTGRES_PORT
|
||||
labelZh: 数据库 端口
|
||||
labelEn: Database Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "policr_mini_prod"
|
||||
edit: true
|
||||
envKey: POSTGRES_DATABSE
|
||||
labelZh: 数据库 名称
|
||||
labelEn: Database Name
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: "policr_mini_prod"
|
||||
edit: true
|
||||
envKey: POSTGRES_USERNAME
|
||||
labelZh: 数据库 用户名
|
||||
labelEn: Database Username
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: POSTGRES_PASSWORD
|
||||
labelZh: 数据库 密码
|
||||
labelEn: Database Password
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: POLICR_MINI_OPTS
|
||||
labelZh: 配置参数
|
||||
labelEn: Configuration parameters
|
||||
required: false
|
||||
type: text
|
39
apps/policr-mini/latest/docker-compose.yml
Normal file
39
apps/policr-mini/latest/docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
policr-mini:
|
||||
image: gramoss/policr-mini:latest
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${POLICR_MINI_ROOT_PATH}/assets:/_assets
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- POLICR_MINI_BOT_ASSETS_PATH=/_assets
|
||||
- POLICR_MINI_SERVER_PORT=${PANEL_APP_PORT_HTTP}
|
||||
- POLICR_MINI_SERVER_ROOT_URL=${POLICR_MINI_SERVER_ROOT_URL}
|
||||
- POLICR_MINI_BOT_NAME=${POLICR_MINI_BOT_NAME}
|
||||
- POLICR_MINI_BOT_OWNER_ID=${POLICR_MINI_BOT_OWNER_ID}
|
||||
- POLICR_MINI_DATABASE_URL="ecto://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABSE}"
|
||||
- POLICR_MINI_DATABASE_POOL_SIZE=${POLICR_MINI_DATABASE_POOL_SIZE:-10}
|
||||
- POLICR_MINI_SERVER_SECRET_KEY_BASE=${POLICR_MINI_SERVER_SECRET_KEY_BASE}
|
||||
- POLICR_MINI_BOT_TOKEN=${POLICR_MINI_BOT_TOKEN}
|
||||
- POLICR_MINI_BOT_WORK_MODE=${POLICR_MINI_BOT_WORK_MODE:-polling}
|
||||
- POLICR_MINI_BOT_GRID_CAPTCHA_INDI_WIDTH=${POLICR_MINI_BOT_GRID_CAPTCHA_INDI_WIDTH:-180}
|
||||
- POLICR_MINI_BOT_GRID_CAPTCHA_INDI_HEIGHT=${POLICR_MINI_BOT_GRID_CAPTCHA_INDI_HEIGHT:-120}
|
||||
- POLICR_MINI_BOT_GRID_CAPTCHA_WATERMARK_FONT_FAMILY=${POLICR_MINI_BOT_GRID_CAPTCHA_WATERMARK_FONT_FAMILY:-Lato}
|
||||
- POLICR_MINI_BOT_AUTO_GEN_COMMANDS=${POLICR_MINI_BOT_AUTO_GEN_COMMANDS:-true}
|
||||
- POLICR_MINI_BOT_MOSAIC_METHOD=${POLICR_MINI_BOT_MOSAIC_METHOD:-spoiler}
|
||||
- POLICR_MINI_UNBAN_METHOD=${POLICR_MINI_UNBAN_METHOD:-until_date}
|
||||
- POLICR_MINI_OPTS=${POLICR_MINI_OPTS}
|
2
apps/policr-mini/latest/envs/default.env
Normal file
2
apps/policr-mini/latest/envs/default.env
Normal file
@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
2
apps/policr-mini/latest/envs/global.env
Normal file
2
apps/policr-mini/latest/envs/global.env
Normal file
@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
17
apps/policr-mini/latest/scripts/init.sh
Normal file
17
apps/policr-mini/latest/scripts/init.sh
Normal file
@ -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
|
10
apps/policr-mini/latest/scripts/uninstall.sh
Normal file
10
apps/policr-mini/latest/scripts/uninstall.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
17
apps/policr-mini/latest/scripts/upgrade.sh
Normal file
17
apps/policr-mini/latest/scripts/upgrade.sh
Normal file
@ -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
|
BIN
apps/policr-mini/logo.png
Normal file
BIN
apps/policr-mini/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user