diff --git a/gb-infra/src/templates/opt/gbo/tenants/default/table-editor/table-editor.sh b/gb-infra/src/templates/opt/gbo/tenants/default/table-editor/table-editor.sh index 5458069..f9889db 100644 --- a/gb-infra/src/templates/opt/gbo/tenants/default/table-editor/table-editor.sh +++ b/gb-infra/src/templates/opt/gbo/tenants/default/table-editor/table-editor.sh @@ -1,21 +1,8 @@ -#!/bin/bash + #!/bin/bash # Fixed container name -CONTAINER_NAME="table-editor" +CONTAINER_NAME="$PARAM_TENANT-table-editor" - - - - - -# Database configuration -PARAM_TABLES_HOST = PARAM_TABLES_HOST="10.16.164.45" -PARAM_TABLES_PORT = PARAM_TABLES_PORT=4444 -PARAM_TABLES_USER = PARAM_TABLES_USER="postgres" -PARAM_TABLES_PASSWORD = PARAM_TABLES_PASSWORD="67a690df" - - -# Port configuration TABLE_EDITOR_PORT="5757" # Paths @@ -48,7 +35,7 @@ mkdir -p \"$BIN_PATH\" /opt/gbo/data /opt/gbo/conf /opt/gbo/logs cd \"$BIN_PATH\" curl http://get.nocodb.com/linux-x64 -o nocodb -L chmod +x nocodb - +" # Set permissions TE_UID=$(lxc exec "$CONTAINER_NAME" -- id -u gbuser) @@ -62,6 +49,9 @@ lxc config device add "$CONTAINER_NAME" tedata disk source="$HOST_DATA" path=/op lxc config device add "$CONTAINER_NAME" teconf disk source="$HOST_CONF" path=/opt/gbo/conf lxc config device add "$CONTAINER_NAME" telogs disk source="$HOST_LOGS" path=/opt/gbo/logs + + + # Create systemd service lxc exec "$CONTAINER_NAME" -- bash -c " cat > /etc/systemd/system/table-editor.service <