From 1b32e6f319e7494ef2fe09185f8bebb49b17c0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 7 Mar 2025 15:22:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20q2tg=20=E6=B2=A1=E6=94=B9=E5=A5=BD?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose/q2tg.yml | 43 +++++++++++++++++++++++++++++++++++ templates/templates/q2tg.json | 26 +++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 compose/q2tg.yml create mode 100644 templates/templates/q2tg.json diff --git a/compose/q2tg.yml b/compose/q2tg.yml new file mode 100644 index 0000000..339900f --- /dev/null +++ b/compose/q2tg.yml @@ -0,0 +1,43 @@ +# Q2TG & NapCat Docker Compose 配置文件 +# 启动命令: NAPCAT_UID=$(id -u) NAPCAT_GID=$(id -g) docker-compose -f ./compose/q2tg.yml up -d +services: + postgres: + image: postgres:14-alpine + restart: unless-stopped + environment: + POSTGRES_DB: db_name + POSTGRES_USER: user + POSTGRES_PASSWORD: password + volumes: + - postgresql:/var/lib/postgresql/data + napcat: + container_name: napcat + image: mlikiowa/napcat-docker:latest + restart: always + environment: + - NAPCAT_UID=${NAPCAT_UID:-1000} + - NAPCAT_GID=${NAPCAT_GID:-1000} + - MODE=q2tg + ports: + - 6099:6099 + - 3001:3001 + volumes: + - ./napcat:/app/napcat + - ./ntqq:/app/.config/QQ + networks: + - q2tg_network + mac_address: "02:42:ac:11:00:02" + + q2tg: + container_name: q2tg + image: clansty/q2tg:rainbowcat + restart: unless-stopped + volumes: + - ./napcat:/app/napcat + - ./ntqq:/app/.config/QQ + networks: + - q2tg_network + +networks: + q2tg_network: + driver: bridge \ No newline at end of file diff --git a/templates/templates/q2tg.json b/templates/templates/q2tg.json new file mode 100644 index 0000000..91c063e --- /dev/null +++ b/templates/templates/q2tg.json @@ -0,0 +1,26 @@ +{ + "network": { + "httpServers": [], + "httpSseServers": [], + "httpClients": [], + "websocketServers": [ + { + "enable": true, + "name": "ws", + "host": "0.0.0.0", + "port": 3001, + "reportSelfMessage": false, + "enableForcePushEvent": true, + "messagePostFormat": "array", + "token": "", + "debug": false, + "heartInterval": 30000 + } + ], + "websocketClients": [], + "plugins": [] + }, + "musicSignUrl": "", + "enableLocalFile2Url": false, + "parseMultMsg": false +} \ No newline at end of file