✨ feat(telegraph-image): add telegraph-image application configuration
- add data.yml with form fields for KV database, dashboard credentials, telegram integration, and content moderation - add docker-compose.yml for container deployment with environment variables and network configuration - add README.md with setup instructions and telegram bot configuration guide in chinese - add README_en.md with english version of setup instructions - add main data.yml with application metadata, tags, and architecture support
This commit is contained in:
parent
c3800b89f6
commit
f66cbc97c8
|
|
@ -0,0 +1,81 @@
|
||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: "8080"
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
label:
|
||||||
|
en: Port
|
||||||
|
zh: 端口
|
||||||
|
required: true
|
||||||
|
type: number
|
||||||
|
edit: true
|
||||||
|
rule: paramPort
|
||||||
|
|
||||||
|
- default: ./data
|
||||||
|
envKey: KV_DATABASE_DIR
|
||||||
|
label:
|
||||||
|
en: KV Database Persistence Directory
|
||||||
|
zh: KV数据库持久化目录
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
edit: true
|
||||||
|
|
||||||
|
- default: ""
|
||||||
|
envKey: BASIC_USER
|
||||||
|
label:
|
||||||
|
en: Dashboard Username
|
||||||
|
zh: 管理面板用户名
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
edit: true
|
||||||
|
rule: paramCommon
|
||||||
|
- default: ""
|
||||||
|
envKey: BASIC_PASS
|
||||||
|
label:
|
||||||
|
en: Dashboard Password
|
||||||
|
zh: 管理面板密码
|
||||||
|
required: true
|
||||||
|
type: password
|
||||||
|
edit: true
|
||||||
|
rule: paramComplexity
|
||||||
|
random: true
|
||||||
|
|
||||||
|
- default: ""
|
||||||
|
envKey: TG_Chat_ID
|
||||||
|
label:
|
||||||
|
en: Telegram Channel ID
|
||||||
|
zh: Telegram 频道 ID
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
edit: true
|
||||||
|
|
||||||
|
- default: ""
|
||||||
|
envKey: TG_Bot_Token
|
||||||
|
label:
|
||||||
|
en: Telegram Bot Token
|
||||||
|
zh: Telegram Bot Token
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
edit: true
|
||||||
|
|
||||||
|
- default: "false"
|
||||||
|
envKey: WhiteList_Mode
|
||||||
|
label:
|
||||||
|
en: WhiteList Mode
|
||||||
|
zh: 白名单模式
|
||||||
|
required: false
|
||||||
|
type: select
|
||||||
|
edit: true
|
||||||
|
values:
|
||||||
|
- label: "True"
|
||||||
|
value: "true"
|
||||||
|
- label: "False"
|
||||||
|
value: "false"
|
||||||
|
|
||||||
|
- default: ""
|
||||||
|
envKey: ModerateContentApiKey
|
||||||
|
label:
|
||||||
|
en: ModerateContent NSFW API key
|
||||||
|
zh: ModerateContent 图片审查 API key
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
|
edit: true
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
services:
|
||||||
|
telegraph-image:
|
||||||
|
image: ghcr.io/pooneyy/telegraph-image:2025.10.29
|
||||||
|
container_name: telegraph-image
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:8080
|
||||||
|
volumes:
|
||||||
|
- ${KV_DATABASE_DIR}:/app/data
|
||||||
|
environment:
|
||||||
|
- BASIC_USER=${BASIC_USER}
|
||||||
|
- BASIC_PASS=${BASIC_PASS}
|
||||||
|
- TG_Chat_ID=${TG_Chat_ID}
|
||||||
|
- TG_Bot_Token=${TG_Bot_Token}
|
||||||
|
- WhiteList_Mode=${WhiteList_Mode}
|
||||||
|
- ModerateContentApiKey=${ModerateContentApiKey}
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Telegraph-Image
|
||||||
|
|
||||||
|
免费图片托管解决方案,Flickr/imgur 替代品。使用 Cloudflare Pages 和 Telegraph。
|
||||||
|
|
||||||
|
## 写在前面
|
||||||
|
|
||||||
|
使用中国大陆备案域名的用户,请务必开启白名单模式,因为对于同样的图片 URI ,所有部署该服务的站点都可访问。
|
||||||
|
|
||||||
|
在别处上传的违规图片,也可以通过你的域名访问。
|
||||||
|
|
||||||
|
>示例
|
||||||
|
>https://telegraph-image.pages.dev/file/7f84b69bcd38c25846374.png
|
||||||
|
>https://testimg.pages.dev/file/7f84b69bcd38c25846374.png
|
||||||
|
|
||||||
|
## 如何获取Telegram的`Bot_Token`和`Chat_ID`
|
||||||
|
|
||||||
|
> 不要滥用,以及避免被他人滥用,以免 Telegram 被封禁
|
||||||
|
|
||||||
|
如果您还没有Telegram账户,请先创建一个。接着,按照以下步骤操作以获取`BOT_TOKEN`和`CHAT_ID`:
|
||||||
|
|
||||||
|
1. **获取`Bot_Token`**
|
||||||
|
- 在Telegram中,向[@BotFather](https://t.me/BotFather)发送命令`/newbot`,根据提示依次输入您的机器人名称和用户名。成功创建机器人后,您将会收到一个`BOT_TOKEN`,用于与Telegram API进行交互。
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2. **设置机器人为频道管理员**
|
||||||
|
- 创建一个新的频道(Channel),进入该频道后,选择频道设置。将刚刚创建的机器人添加为频道管理员,这样机器人才能发送消息。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. **获取`Chat_ID`**
|
||||||
|
- 通过[@VersaToolsBot](https://t.me/VersaToolsBot)获取您的频道ID。向该机器人发送消息,按照指示操作,最后您将得到`CHAT_ID`(即频道的ID)。
|
||||||
|
- 或者通过[@GetTheirIDBot](https://t.me/GetTheirIDBot)获取您的频道ID。向该机器人发送消息,按照指示操作,最后您将得到`CHAT_ID`(即频道的ID)。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
最后去Cloudflare Pages后台设置相关的环境变量(注:修改环境变量后,需要重新部署才能生效)
|
||||||
|
| 环境变量 | 示例值 | 说明 |
|
||||||
|
|-----------------|---------------------------|----------------------------------------------------------------------------------------|
|
||||||
|
| `TG_Bot_Token` | `123468:AAxxxGKrn5` | 从[@BotFather](https://t.me/BotFather)获取的Telegram Bot Token。 |
|
||||||
|
| `TG_Chat_ID` | `-1234567` | 频道的ID,确保TG Bot是该频道或群组的管理员。 |
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Telegraph-Image
|
||||||
|
|
||||||
|
Free Image Hosting solution, Flickr/imgur alternative. Using Cloudflare Pages and Telegraph.
|
||||||
|
|
||||||
|
## How to Obtain `Bot_Token` and `Chat_ID` for Telegram
|
||||||
|
|
||||||
|
> Do not abuse and avoid being abused by others, lest Telegram be banned
|
||||||
|
|
||||||
|
If you don't have a Telegram account yet, please create one first. Then, follow these steps to get the `Bot_Token` and `Chat_ID`:
|
||||||
|
|
||||||
|
1. **Get the `Bot_Token`**
|
||||||
|
- In Telegram, send the command `/newbot` to [@BotFather](https://t.me/BotFather), and follow the prompts to input your bot's name and username. Once successfully created, you will receive a `Bot_Token`, which is used to interact with the Telegram API.
|
||||||
|
|
||||||
|
2. **Set the bot as a channel administrator**
|
||||||
|
- Create a new channel and, after entering the channel, go to channel settings. Add the bot you just created as a channel administrator, so it can send messages.
|
||||||
|
|
||||||
|
3. **Get the `Chat_ID`**
|
||||||
|
- Use [@GetTheirIDBot](https://t.me/GetTheirIDBot) to get your channel ID. Send a message to this bot and follow the instructions to receive your `Chat_ID` (the ID of your channel).
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: Telegraph Image
|
||||||
|
tags:
|
||||||
|
- 实用工具
|
||||||
|
- 图片托管
|
||||||
|
title: 免费图片托管解决方案,使用 Cloudflare Pages 和 Telegraph
|
||||||
|
description:
|
||||||
|
en: Image Hosting solution, Using Cloudflare Pages and Telegraph.
|
||||||
|
zh: 免费图片托管解决方案,使用 Cloudflare Pages 和 Telegraph
|
||||||
|
additionalProperties:
|
||||||
|
key: telegraph-image
|
||||||
|
name: Telegraph Image
|
||||||
|
tags:
|
||||||
|
- Tool
|
||||||
|
shortDescZh: 免费图片托管解决方案,使用 Cloudflare Pages 和 Telegraph
|
||||||
|
shortDescEn: Image Hosting solution, Using Cloudflare Pages and Telegraph.
|
||||||
|
type: website
|
||||||
|
crossVersionUpdate: true
|
||||||
|
limit: 0
|
||||||
|
website: https://github.com/cf-pages/Telegraph-Image
|
||||||
|
github: https://github.com/cf-pages/Telegraph-Image
|
||||||
|
document: https://github.com/cf-pages/Telegraph-Image
|
||||||
|
architecture:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Loading…
Reference in New Issue