Skip to content

Commit

Permalink
Processed apps directory via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
QYG2297248353 committed Jan 13, 2025
1 parent e388efc commit 7de69b9
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 18 deletions.
12 changes: 12 additions & 0 deletions appstore/nodebb/3.12.2/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ NODEBB_ROOT_PATH=/home/nodebb
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=4567

# 服务地址 [必填]
NODEBB_URL=http://127.0.0.1:4567

# 管理员用户名 [必填]
NODEBB_ADMIN_USERNAME=

# 管理员密码 [必填]
NODEBB_ADMIN_PASSWORD=

# 管理员邮箱 [必填]
NODEBB_ADMIN_EMAIL=

# 数据库类型 [必填]
NODEBB_DB=postgres

Expand Down
11 changes: 11 additions & 0 deletions appstore/nodebb/3.12.2/conf/setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"defaults": {
"$NODEBB_DB": {
"host": "$NODEBB_DB_HOST",
"port": $NODEBB_DB_PORT,
"database": "$NODEBB_DB_NAME",
"username": "$NODEBB_DB_USER",
"password": "$NODEBB_DB_PASSWORD"
}
}
}
28 changes: 28 additions & 0 deletions appstore/nodebb/3.12.2/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,34 @@ additionalProperties:
required: true
rule: paramPort
type: number
- default: "http://127.0.0.1:4567"
edit: true
envKey: NODEBB_URL
labelZh: 服务地址
labelEn: Service address
required: true
type: text
- default: ""
edit: true
envKey: NODEBB_ADMIN_USERNAME
labelZh: 管理员用户名
labelEn: Admin Username
required: true
type: text
- default: ""
edit: true
envKey: NODEBB_ADMIN_PASSWORD
labelZh: 管理员密码
labelEn: Admin Password
required: true
type: password
- default: ""
edit: true
envKey: NODEBB_ADMIN_EMAIL
labelZh: 管理员邮箱
labelEn: Admin Email
required: true
type: text
- default: "postgres"
edit: true
envKey: NODEBB_DB
Expand Down
10 changes: 1 addition & 9 deletions appstore/nodebb/3.12.2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ services:
- .env
environment:
- TZ=Asia/Shanghai
- bind_address=0.0.0.0
- port=4567
- url=http://127.0.0.1:4567
- database=${NODEBB_DB}
- ${NODEBB_DB}__host=${NODEBB_DB_HOST}
- ${NODEBB_DB}__port=${NODEBB_DB_PORT}
- ${NODEBB_DB}__database=${NODEBB_DB_NAME}
- ${NODEBB_DB}__username=${NODEBB_DB_USER}
- ${NODEBB_DB}__password=${NODEBB_DB_PASSWORD}
image: ghcr.io/nodebb/nodebb:3.12.2
labels:
createdBy: Apps
Expand All @@ -31,3 +22,4 @@ services:
- ${NODEBB_ROOT_PATH}/build:/usr/src/app/build
- ${NODEBB_ROOT_PATH}/uploads:/usr/src/app/public/uploads
- ${NODEBB_ROOT_PATH}/config:/opt/config
- ${NODEBB_ROOT_PATH}/setup.json:/usr/src/app/setup.json
26 changes: 26 additions & 0 deletions appstore/nodebb/3.12.2/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ if [ -f .env ]; then
mkdir -p "$NODEBB_ROOT_PATH/uploads"
mkdir -p "$NODEBB_ROOT_PATH/config"

# setup-3 初始化参数配置
if [ -z "$NODEBB_DB_NAME" ]; then
NODEBB_DB_NAME="nodebb"
fi

if [ -z "$NODEBB_DB_USER" ]; then
NODEBB_DB_USER=""
fi

if [ -z "$NODEBB_DB_PASSWORD" ]; then
NODEBB_DB_PASSWORD=""
fi

SETUP_JSON_PATH="$NODEBB_ROOT_PATH/setup.json"
cp ./conf/setup.json "$SETUP_JSON_PATH"
sed -i "
s|\$NODEBB_DB_HOST|$NODEBB_DB_HOST|g;
s|\$NODEBB_DB_PORT|$NODEBB_DB_PORT|g;
s|\$NODEBB_DB_NAME|$NODEBB_DB_NAME|g;
s|\$NODEBB_DB_USER|$NODEBB_DB_USER|g;
s|\$NODEBB_DB_PASSWORD|$NODEBB_DB_PASSWORD|g;
s|\$NODEBB_DB|$NODEBB_DB|g
" "$SETUP_JSON_PATH"


# setup-4 update dir permissions
chown -R 1001:1001 "$NODEBB_ROOT_PATH"
chown -R 1001:1001 "$NODEBB_ROOT_PATH/node_modules"
chown -R 1001:1001 "$NODEBB_ROOT_PATH/build"
Expand Down
14 changes: 14 additions & 0 deletions appstore/nodebb/3.12.2/scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ if [ -f .env ]; then
mkdir -p "$NODEBB_ROOT_PATH/uploads"
mkdir -p "$NODEBB_ROOT_PATH/config"

if [ ! -f "$NODEBB_ROOT_PATH/setup.json" ]; then
SETUP_JSON_PATH="$NODEBB_ROOT_PATH/setup.json"
cp ./conf/setup.json "$SETUP_JSON_PATH"
sed -i "
s|\$NODEBB_DB_HOST|$NODEBB_DB_HOST|g;
s|\$NODEBB_DB_PORT|$NODEBB_DB_PORT|g;
s|\$NODEBB_DB_NAME|$NODEBB_DB_NAME|g;
s|\$NODEBB_DB_USER|$NODEBB_DB_USER|g;
s|\$NODEBB_DB_PASSWORD|$NODEBB_DB_PASSWORD|g;
s|\$NODEBB_DB|$NODEBB_DB|g
" "$SETUP_JSON_PATH"
fi

# setup-3 update dir permissions
chown -R 1001:1001 "$NODEBB_ROOT_PATH"
chown -R 1001:1001 "$NODEBB_ROOT_PATH/node_modules"
chown -R 1001:1001 "$NODEBB_ROOT_PATH/build"
Expand Down
12 changes: 12 additions & 0 deletions dockge/nodebb/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ NODEBB_ROOT_PATH=/home/nodebb
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=4567

# 服务地址 [必填]
NODEBB_URL=http://127.0.0.1:4567

# 管理员用户名 [必填]
NODEBB_ADMIN_USERNAME=

# 管理员密码 [必填]
NODEBB_ADMIN_PASSWORD=

# 管理员邮箱 [必填]
NODEBB_ADMIN_EMAIL=

# 数据库类型 [必填]
NODEBB_DB=postgres

Expand Down
11 changes: 11 additions & 0 deletions dockge/nodebb/conf/setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"defaults": {
"$NODEBB_DB": {
"host": "$NODEBB_DB_HOST",
"port": $NODEBB_DB_PORT,
"database": "$NODEBB_DB_NAME",
"username": "$NODEBB_DB_USER",
"password": "$NODEBB_DB_PASSWORD"
}
}
}
10 changes: 1 addition & 9 deletions dockge/nodebb/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ services:
- .env
environment:
- TZ=Asia/Shanghai
- bind_address=0.0.0.0
- port=4567
- url=http://127.0.0.1:4567
- database=${NODEBB_DB}
- ${NODEBB_DB}__host=${NODEBB_DB_HOST}
- ${NODEBB_DB}__port=${NODEBB_DB_PORT}
- ${NODEBB_DB}__database=${NODEBB_DB_NAME}
- ${NODEBB_DB}__username=${NODEBB_DB_USER}
- ${NODEBB_DB}__password=${NODEBB_DB_PASSWORD}
image: ghcr.io/nodebb/nodebb:3.12.2
labels:
createdBy: Apps
Expand All @@ -31,3 +22,4 @@ services:
- ${NODEBB_ROOT_PATH}/build:/usr/src/app/build
- ${NODEBB_ROOT_PATH}/uploads:/usr/src/app/public/uploads
- ${NODEBB_ROOT_PATH}/config:/opt/config
- ${NODEBB_ROOT_PATH}/setup.json:/usr/src/app/setup.json

0 comments on commit 7de69b9

Please sign in to comment.