mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-21 05:41:43 +00:00
👷 Support gitpod cloud ide
This commit is contained in:
parent
29f71fb0ec
commit
fe8ed59794
18
.gitpod.yml
Normal file
18
.gitpod.yml
Normal file
@ -0,0 +1,18 @@
|
||||
tasks:
|
||||
- init: |
|
||||
cp .gitpod/docker-compose.gen.yml ./docker-compose.yml
|
||||
cp .gitpod/env.env ./.env
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
- command: |
|
||||
pip install virtualenv pdm
|
||||
virtualenv venv
|
||||
pdm use venv
|
||||
pdm install -G :all
|
||||
sudo venv/bin/playwright install-deps
|
||||
venv/bin/playwright install chromium
|
||||
venv/bin/alembic upgrade head
|
||||
|
||||
ports:
|
||||
- port: 8080
|
||||
onOpen: open-browser
|
7
.gitpod/README.md
Normal file
7
.gitpod/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# 使用 gitpod 远程开发
|
||||
|
||||
使用 gitpod 打开本项目时将会自动启动 mysql、redis
|
||||
|
||||
并且自动创建虚拟环境,安装依赖
|
||||
|
||||
你只需要填写 `.env` 中的 `OWNER` 和 `BOT_TOKEN` 即可快速运行本项目。
|
25
.gitpod/docker-compose.gen.yml
Normal file
25
.gitpod/docker-compose.gen.yml
Normal file
@ -0,0 +1,25 @@
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data/redis_data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
logging:
|
||||
driver: none
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data/db_data:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
- MYSQL_DATABASE=paimon
|
||||
logging:
|
||||
driver: none
|
89
.gitpod/env.env
Normal file
89
.gitpod/env.env
Normal file
@ -0,0 +1,89 @@
|
||||
# debug 开关
|
||||
DEBUG=true
|
||||
|
||||
AUTO_RELOAD=false
|
||||
RELOAD_DELAY=0.25
|
||||
RELOAD_DIRS=[]
|
||||
RELOAD_INCLUDE=[]
|
||||
RELOAD_EXCLUDE=[]
|
||||
|
||||
# MySQL
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD="root"
|
||||
DB_DATABASE=paimon
|
||||
|
||||
# Redis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
REDIS_DB=0
|
||||
REDIS_PASSWORD=""
|
||||
|
||||
# InfluxDB
|
||||
#INFLUXDB_HOST=localhost
|
||||
#INFLUXDB_PORT=8086
|
||||
#INFLUXDB_TOKEN=""
|
||||
#INFLUXDB_ORG=""
|
||||
|
||||
# 联系 https://t.me/BotFather 使用 /newbot 命令创建机器人并获取 token
|
||||
BOT_TOKEN="xxx:xxx"
|
||||
|
||||
BOT_OFFICIAL=["PaimonMasterBot", "HonkaiStarRail_ZH_Bot"]
|
||||
|
||||
OWNER=000000
|
||||
|
||||
# 记录错误并发送消息通知开发人员
|
||||
ERROR_NOTIFICATION_CHAT_ID=
|
||||
|
||||
# 文章推送群组
|
||||
#CHANNELS=[-1]
|
||||
#CHANNELS_HELPER=-1
|
||||
|
||||
# 是否允许机器人邀请到其他群 默认不允许 如果允许 可以允许全部人或有认证选项 可选配置项
|
||||
# JOIN_GROUPS = "NO_ALLOW"
|
||||
|
||||
# 群验证功能 可选配置项
|
||||
# VERIFY_GROUPS=[]
|
||||
|
||||
# logger 配置
|
||||
LOGGER_WIDTH=180
|
||||
LOGGER_LOG_PATH="logs"
|
||||
LOGGER_TIME_FORMAT="[%Y-%m-%d %X]"
|
||||
LOGGER_TRACEBACK_MAX_FRAMES=20
|
||||
LOGGER_RENDER_KEYWORDS=["BOT"]
|
||||
|
||||
# error
|
||||
#ERROR_PB_URL=https://fars.ee
|
||||
ERROR_PB_SUNSET=43200
|
||||
ERROR_PB_MAX_LINES=1000
|
||||
|
||||
PASS_CHALLENGE_USER_WEB=https://sign.paimon.vip/
|
||||
PLUGIN_DOWNLOAD_FILE_MAX_SIZE=20
|
||||
|
||||
# Request 超时配置 可选配置项
|
||||
READ_TIMEOUT=30
|
||||
# 指定等待服务器响应的最长时间
|
||||
WRITE_TIMEOUT=30
|
||||
# 指定等待写入操作完成的最长时间(就网络套接字而言,即请求或上传一个文件)
|
||||
CONNECT_TIMEOUT=30
|
||||
# 指定等待连接到服务器的最长时间
|
||||
POOL_TIMEOUT=30
|
||||
# Bot.Update 超时配置
|
||||
# TIMEOUT=10
|
||||
# 服务器出现故障时Updater的引导阶段重试时间
|
||||
# UPDATE_READ_TIMEOUT=42
|
||||
# UPDATE_WRITE_TIMEOUT=10
|
||||
# UPDATE_CONNECT_TIMEOUT=10
|
||||
# UPDATE_POOL_TIMEOUT=10
|
||||
|
||||
# Web Server
|
||||
WEB_ENABLE=true
|
||||
WEB_URL=http://localhost:8088/
|
||||
WEB_HOST=0.0.0.0
|
||||
WEB_PORT=8080
|
||||
|
||||
NOTICE_USER_MISMATCH="再乱点我叫防卫科、银鬃铁卫和云骑军了!"
|
||||
|
||||
# 文章推送
|
||||
#POST_CHAT_ID=-1
|
Loading…
Reference in New Issue
Block a user