chore(deps): update nocodb/nocodb docker tag to v0.257.2 (#2312)

* chore(deps): update nocodb/nocodb docker tag to v0.257.2

* Update app version [skip ci]

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-action update-app-version <githubaction@githubaction.com>
This commit is contained in:
renovate[bot]
2024-10-18 12:05:30 +08:00
committed by GitHub
co-authored by renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> github-action update-app-version
parent 673a354504
commit 136b9dff41
3 changed files with 1 additions and 1 deletions
+52
View File
@@ -0,0 +1,52 @@
additionalProperties:
formFields:
- child:
default: ""
envKey: PANEL_DB_HOST
required: true
type: service
default: mysql
edit: true
envKey: PANEL_DB_TYPE
labelZh: 数据库 服务
labelEn: Database Service
required: true
type: apps
values:
- label: MySQL
value: mysql
- label: PostgreSQL
value: postgresql
- label: MariaDB
value: mariadb
- default: nocodb
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: nocodb
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: nocodb
envKey: PANEL_DB_USER_PASSWORD
labelEn: Password
labelZh: 数据库用户密码
random: true
required: true
rule: paramComplexity
type: password
- default: 8080
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
+18
View File
@@ -0,0 +1,18 @@
services:
nocodb:
image: nocodb/nocodb:0.257.2
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:8080
environment:
NC_DB: "${PANEL_DB_TYPE}://${PANEL_DB_HOST}:${PANEL_DB_PORT}?u=${PANEL_DB_USER}&p=${PANEL_DB_USER_PASSWORD}&d=${PANEL_DB_NAME}"
volumes:
- ./data:/usr/app/data
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
ENV_FILE=".env"
if [ -f "$ENV_FILE" ]; then
PANEL_DB_TYPE=$(grep '^PANEL_DB_TYPE=' "$ENV_FILE" | cut -d '=' -f 2 | tr -d '"')
if [ "$PANEL_DB_TYPE" == "postgresql" ]; then
NEW_DB_TYPE="pg"
elif [ "$PANEL_DB_TYPE" == "mysql" ] || [ "$PANEL_DB_TYPE" == "mariadb" ]; then
NEW_DB_TYPE="mysql2"
else
echo "Unsupported PANEL_DB_TYPE value: $PANEL_DB_TYPE"
exit 1
fi
sed -i "s/^PANEL_DB_TYPE=.*/PANEL_DB_TYPE=\"$NEW_DB_TYPE\"/" "$ENV_FILE"
else
echo ".env file not found!"
exit 1
fi