chore(rocketchat): update to 8.8.0 under trusted-source waiver

This commit is contained in:
okxlin
2026-09-02 14:45:12 +08:00
parent 6553c30721
commit de3558ebd6
8 changed files with 313 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
PANEL_APP_PORT_HTTP=18087
ROOT_URL=http://127.0.0.1:18087
TZ=Asia/Shanghai
APP_DATA_DIR=./data
REG_TOKEN=
ADMIN_USERNAME=admin
ADMIN_NAME=Admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASS=rocket_admin_password
CONTAINER_NAME=rocketchat
+150
View File
@@ -0,0 +1,150 @@
additionalProperties:
formFields:
- default: 18087
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
label:
en: Port
zh: 端口
zh-Hant:
ja: ポート
ko: 포트
ru: Порт
ms: Port
pt-br: Porta
required: true
rule: paramPort
type: number
- default: http://127.0.0.1:18087
edit: true
envKey: ROOT_URL
labelEn: Public URL
labelZh: 外部访问地址
label:
en: Public URL
zh: 外部访问地址
zh-Hant: 外部存取位址
ja: 公開 URL
ko: 공개 URL
ru: Публичный URL
ms: URL awam
pt-br: URL publico
required: true
rule: paramExtUrl
type: text
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Timezone
labelZh: 时区
label:
en: Timezone
zh: 时区
zh-Hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon waktu
pt-br: Fuso horario
required: true
type: text
- default: ./data
edit: true
envKey: APP_DATA_DIR
labelEn: Data Directory
labelZh: 数据目录
label:
en: Data Directory
zh: 数据目录
zh-Hant: 資料目錄
ja: データディレクトリ
ko: 데이터 디렉터리
ru: Каталог данных
ms: Direktori data
pt-br: Diretorio de dados
required: true
type: text
- default: ""
edit: true
envKey: REG_TOKEN
labelEn: Registration Token
labelZh: 注册令牌
label:
en: Registration Token
zh: 注册令牌
zh-Hant: 註冊權杖
ja: 登録トークン
ko: 등록 토큰
ru: Токен регистрации
ms: Token pendaftaran
pt-br: Token de registro
required: false
type: text
- default: admin
edit: true
envKey: ADMIN_USERNAME
labelEn: Admin Username
labelZh: 管理员用户名
label:
en: Admin Username
zh: 管理员用户名
zh-Hant: 管理員使用者名稱
ja: 管理者ユーザー名
ko: 관리자 사용자 이름
ru: Имя администратора
ms: Nama pengguna pentadbir
pt-br: Nome de usuario administrador
required: true
type: text
- default: Admin
edit: true
envKey: ADMIN_NAME
labelEn: Admin Name
labelZh: 管理员姓名
label:
en: Admin Name
zh: 管理员姓名
zh-Hant: 管理員姓名
ja: 管理者名
ko: 관리자 이름
ru: Имя администратора
ms: Nama pentadbir
pt-br: Nome do administrador
required: true
type: text
- default: admin@example.com
edit: true
envKey: ADMIN_EMAIL
labelEn: Admin Email
labelZh: 管理员邮箱
label:
en: Admin Email
zh: 管理员邮箱
zh-Hant: 管理員信箱
ja: 管理者メール
ko: 관리자 이메일
ru: Email администратора
ms: E-mel pentadbir
pt-br: Email do administrador
required: true
type: text
- default: rocket_admin_password
edit: true
envKey: ADMIN_PASS
labelEn: Admin Password
labelZh: 管理员密码
label:
en: Admin Password
zh: 管理员密码
zh-Hant: 管理員密碼
ja: 管理者パスワード
ko: 관리자 비밀번호
ru: Пароль администратора
ms: Kata laluan pentadbir
pt-br: Senha do administrador
random: true
required: true
rule: paramComplexity
type: password
View File
+142
View File
@@ -0,0 +1,142 @@
services:
rocketchat:
image: "registry.rocket.chat/rocketchat/rocket.chat:8.8.0"
container_name: ${CONTAINER_NAME}
restart: always
depends_on:
mongodb:
condition: service_healthy
nats:
condition: service_healthy
networks:
- 1panel-network
- rocketchat-network
ports:
- "${PANEL_APP_PORT_HTTP}:3000"
entrypoint: sh
command:
- -c
- |
protocol=$(echo $$MONGO_URL | awk -F'://' '{print $$1}')
if [ "$$protocol" = "mongodb+srv" ]; then
echo "MongoDB is using SRV protocol, starting Rocket.Chat without local TCP wait"
exec node main.js
fi
host_port=$(echo $$MONGO_URL | awk -F/ '{print $$3}')
if echo $$host_port | grep -q @; then
host_port=$(echo $$host_port | awk -F@ '{print $$2}')
fi
host=$(echo $$host_port | awk -F: '{print $$1}')
port=$(echo $$host_port | awk -F: '{print $$2}')
if [ -z "$$port" ]; then
port=27017
fi
echo "Waiting for MongoDB ($$host:$$port) before starting Rocket.Chat"
for i in $(seq 1 60); do
if nc -z $$host $$port >/dev/null 2>&1; then
exec node main.js
fi
sleep 5
done
echo "MongoDB did not become reachable in time"
exit 1
environment:
- TZ=${TZ}
- ROOT_URL=${ROOT_URL}
- PORT=3000
- DEPLOY_METHOD=docker
- DEPLOY_PLATFORM=compose
- REG_TOKEN=${REG_TOKEN}
- MONGO_URL=mongodb://mongodb:27017/rocketchat?replicaSet=rs0
- TRANSPORTER=monolith+nats://nats:4222
- INSTANCE_IP=
- ADMIN_USERNAME=${ADMIN_USERNAME}
- ADMIN_NAME=${ADMIN_NAME}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASS=${ADMIN_PASS}
healthcheck:
test: ["CMD-SHELL", "nc -z -w 10 127.0.0.1 3000"]
interval: 30s
timeout: 10s
retries: 10
start_period: 90s
labels:
createdBy: "Apps"
mongodb:
image: "docker.io/mongodb/mongodb-community-server:8.2-ubi8"
container_name: ${CONTAINER_NAME}-mongodb
user: root
restart: always
networks:
- rocketchat-network
volumes:
- "${APP_DATA_DIR}/mongodb:/data/db"
entrypoint:
- sh
- -ec
- |
install -d -o mongod -g mongod -m 755 /data/db
if [ "$(stat -c '%u:%g' /data/db)" != "1000:1000" ]; then
chown -R mongod:mongod /data/db
fi
su -s /bin/sh mongod -c 'exec mongod --replSet rs0 --bind_ip_all' &
pid=$$!
until mongosh 'mongodb://127.0.0.1:27017/?directConnection=true' --quiet --eval 'db.adminCommand("ping")' >/dev/null 2>&1; do
sleep 2
done
cat >/tmp/rs-init.js <<JS
const replSetName = 'rs0';
const advertisedHost = 'mongodb';
const port = '27017';
try {
const status = rs.status();
print('Replica set already initialized: ' + status.set);
} catch (error) {
const message = String(error && (error.message || error));
if (message.includes('no replset config') || message.includes('NotYetInitialized')) {
print('Initiating replica set ' + replSetName + ' at ' + advertisedHost + ':' + port);
rs.initiate({_id: replSetName, members: [{_id: 0, host: advertisedHost + ':' + port}]});
} else {
throw error;
}
}
JS
mongosh 'mongodb://127.0.0.1:27017/?directConnection=true' --quiet /tmp/rs-init.js
for i in $(seq 1 60); do
if mongosh 'mongodb://127.0.0.1:27017/?directConnection=true' --quiet --eval 'try { quit(rs.status().ok === 1 ? 0 : 1) } catch (error) { quit(1) }' >/dev/null 2>&1; then
break
fi
sleep 2
done
wait "$$pid"
healthcheck:
test: ["CMD-SHELL", "mongosh 'mongodb://127.0.0.1:27017/?directConnection=true' --quiet --eval 'try { quit(rs.status().ok === 1 ? 0 : 1) } catch (error) { quit(1) }'"]
interval: 30s
timeout: 10s
retries: 10
start_period: 60s
labels:
createdBy: "Apps"
nats:
image: "docker.io/nats:2.11-alpine"
container_name: ${CONTAINER_NAME}-nats
restart: always
command: --http_port 8222
networks:
- rocketchat-network
healthcheck:
test: ["CMD-SHELL", "nc -z -w 10 127.0.0.1 4222"]
interval: 30s
timeout: 10s
retries: 10
start_period: 10s
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
rocketchat-network:
driver: bridge
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
DATA_DIR="${APP_DATA_DIR:-./data}"
mkdir -p "${DATA_DIR}/mongodb"
chown -R 1000:1000 "${DATA_DIR}/mongodb" 2>/dev/null || true
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0