-
Notifications
You must be signed in to change notification settings - Fork 260
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I am deploying Lowcoder locally using Docker and attempting to connect to a locally running MariaDB database. I've used docker-compose
to deploy the multi-version of Lowcoder. Concurrently, I've deployed both MariaDB and MySQL database containers using docker run
commands.
Upon logging into Lowcoder, I successfully added both MariaDB and MySQL data sources, and connection tests for both were successful. However, when navigating to the design interface, dragging a Form component, and clicking "Generate a Form from one of your Data Sources", the data source dropdown only displays the MySQL data source, and the MariaDB data source is not present.
This indicates that Lowcoder's form generation feature might not be correctly acquiring or parsing metadata from MariaDB, even though the underlying connection is successful.
Expected Behavior
In Lowcoder's "Generate Form from Data Source" feature, the data source dropdown should display both MariaDB and MySQL data sources. Upon selecting the MariaDB data source, the table/view dropdown should display all available tables and views from the MariaDB database, allowing the user to select and generate a form, similar to how it works with a MySQL database connection.
Actual Behavior:
In Lowcoder's "Generate Form from Data Source" feature, the data source dropdown only displays the MySQL data source, and the MariaDB data source is not present. This means it's not possible to generate forms from the MariaDB database using this feature.
Steps to reproduce
- Deploy Lowcoder:
Deploy Lowcoder's multi-version usingdocker-compose
in an intranet environment. default.env、default-multi.env、override.env
services:
##
## Start services required for Lowcoder (MongoDB and Redis)
##
mongodb:
image: "mongo:7.0"
container_name: mongodb
environment:
MONGO_INITDB_DATABASE: lowcoder
MONGO_INITDB_ROOT_USERNAME: lowcoder
MONGO_INITDB_ROOT_PASSWORD: secret123
volumes:
- ./lowcoder-stacks/data/mongodb:/data/db
restart: unless-stopped
healthcheck: # https://github.com/rodrigobdz/docker-compose-healthchecks?tab=readme-ov-file#mongo
test:
[
"CMD",
"mongosh",
"--quiet",
"127.0.0.1/test",
"--eval",
"'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'",
]
interval: 5s
timeout: 10s
retries: 10
start_period: 40s
redis:
image: redis:7-alpine
container_name: redis
restart: unless-stopped
healthcheck: # https://stackoverflow.com/a/71504657
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 10
##
## Start Lowcoder backend services (api-service and node-service)
##
lowcoder-api-service:
image: lowcoderorg/lowcoder-ce-api-service:latest
container_name: lowcoder-api-service
# Enabled ports to be able to access backend from host
# ports:
# - "8080:8080"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
restart: true
redis:
condition: service_healthy
restart: true
volumes:
- ./lowcoder-stacks:/lowcoder-stacks
- ./lowcoder-stacks/assets:/lowcoder/assets
healthcheck: #https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck
test: curl -sS http://lowcoder-api-service:8080 | grep -c "Lowcoder API is up and runnig" > /dev/null
interval: 3s
timeout: 5s
retries: 10
lowcoder-node-service:
image: lowcoderorg/lowcoder-ce-node-service:latest
container_name: lowcoder-node-service
# Enabled ports to be able to access backend from host
# ports:
# - "6060:6060"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
lowcoder-api-service:
condition: service_healthy
restart: true
healthcheck: #https://stackoverflow.com/questions/71101967/how-should-i-use-grep-in-docker-compose-healthcheck
test: curl -sS http://lowcoder-node-service:6060 | grep -c "Lowcoder Node Service is up and running" > /dev/null
interval: 3s
timeout: 5s
retries: 10
##
## Start Lowcoder web frontend
##
lowcoder-frontend:
image: lowcoderorg/lowcoder-ce-frontend:latest
container_name: lowcoder-frontend
ports:
- "3000:3000"
env_file:
- path: ./default.env
required: true
- path: ./default-multi.env
required: true
- path: ./override.env
required: false
restart: unless-stopped
depends_on:
lowcoder-node-service:
condition: service_healthy
restart: true
lowcoder-api-service:
condition: service_healthy
restart: true
volumes:
- ./lowcoder-stacks/assets:/lowcoder/assets
- ./lowcoder-stacks/ssl:/lowcoder-stacks/ssl
healthcheck:
test: curl --fail http://lowcoder-frontend:3000 || exit 1
interval: 5s
retries: 10
start_period: 10s
timeout: 10s
-
Start MariaDB Container:
docker run --name mariadb -p 3306:3306 -e MARIADB_ROOT_PASSWORD=123456 -v mariadb_data:/var/lib/mysql -d mariadb:latest
(Note:
mariadb:latest
was MariaDB 11.x at the time of my testing.) -
Start MySQL Container (for comparison):
docker run --name mysql -p 3307:3306 -e MYSQL_ROOT_PASSWORD=123456 -v mysql-data:/var/lib/mysql -d mysql:8.0
-
Add MariaDB Data Source in Lowcoder:
- Name:
mariadb
- Host:
192.168.20.5
(orhost.docker.internal
if Lowcoder container and MariaDB container are on the same Docker network, and MariaDB container name ismariadb
) - Port:
3306
- Database Name:
mysql
(or your actual database name) - User Name:
root
- Password:
123456
- Click "Test Connection", connection successful.
- Name:
-
Add MySQL Data Source in Lowcoder (for comparison):
- Name:
192.168.20.5-mysql
- Host:
192.168.20.5
(orhost.docker.internal
if Lowcoder container and MySQL container are on the same Docker network, and MySQL container name ismysql
) - Port:
3307
- Database Name:
mysql
(or your actual database name) - User Name:
root
- Password:
123456
- Click "Test Connection", connection successful.
- Name:
-
Navigate to Lowcoder's design interface, drag a Form component, and click "Generate a Form from one of your Data Sources":
- Observe the data source dropdown.
-
Observe the data source dropdown:
- The dropdown only displays the MySQL data source (
192.168.20.5-mysql
). - The MariaDB data source (
mariadb
) is not present in the dropdown.
- The dropdown only displays the MySQL data source (
-
Switch to the MySQL data source (
192.168.20.5-mysql
):
Environment
- Operating System:
centos 7
- Docker Version:
Docker version 20.10.24, build 297e128
- MariaDB Version:
mariadb:latest
- MySQL Version (for comparison):
mysql:8.0
- Database Connection Method: Lowcoder container connects to MariaDB/MySQL containers running on the host machine, using the host IP
Additional Information
No response