Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to add MySQL and PostgreSQL to Docker#160

AnsweredbyFalkWolsky
yogeshvachhani asked this question inQ&A
Discussion options

I checked the Docker configuration/docker-compose file in that only MongoDB is getting installed.

I want to install two other databases.

  1. MySQL
  2. PostgreSQL

How to modify the file and configure these two RDBMS?

Regards,

Yogesh

You must be logged in to vote

Typically you would only add this as new sections to the docker-compose file.

For MySQL:

services:  db:    image: mysql:5.7 #or any other version    restart: always    environment:      MYSQL_DATABASE: 'db'      # So you don't have to use root, but you can if you like      MYSQL_USER: 'user'      # You can use whatever password you like      MYSQL_PASSWORD: 'password'      # Password for root access      MYSQL_ROOT_PASSWORD: 'password'    ports:      # <Port exposed> : <MySQL Port running inside container>      - '3306:3306'    expose:      # Opens port 3306 on the container      - '3306'      # Where our data will be persisted    volumes:      - my-db:/var/lib/mysql#…

Replies: 3 comments 2 replies

Comment options

Typically you would only add this as new sections to the docker-compose file.

For MySQL:

services:  db:    image: mysql:5.7 #or any other version    restart: always    environment:      MYSQL_DATABASE: 'db'      # So you don't have to use root, but you can if you like      MYSQL_USER: 'user'      # You can use whatever password you like      MYSQL_PASSWORD: 'password'      # Password for root access      MYSQL_ROOT_PASSWORD: 'password'    ports:      # <Port exposed> : <MySQL Port running inside container>      - '3306:3306'    expose:      # Opens port 3306 on the container      - '3306'      # Where our data will be persisted    volumes:      - my-db:/var/lib/mysql# Names our volumevolumes:  my-db:

And Postgres:

services:  db:    image: postgres:14.1-alpine #or any other version    restart: always    environment:      - POSTGRES_USER=postgres      - POSTGRES_PASSWORD=postgres    ports:      - '5432:5432'    volumes:       - db:/var/lib/postgresql/datavolumes:  db:    driver: local

These are just examples.

You must be logged in to vote
0 replies
Answer selected byyogeshvachhani
Comment options

Would it be possible to define Environment variables which LC would pickup for connecting with Other Database services added?

You must be logged in to vote
1 reply
@FalkWolsky
Comment options

No. Environment Variables are meant to configure an instance "how to run." MongoDB is the so called "Meta-Data-Database", which does not contain "Application Data" in the sense of the Applications which you build on Lowcoder.
Other Database Services - to use in Lowcoder Applications are meant to be added as Data Sources, as is done in the UI or via API.

Comment options

Can add another instance of Mongo?

You must be logged in to vote
1 reply
@FalkWolsky
Comment options

As an docker-compose file is flexible it it's architecture, you can add as many databases or instances as you like. You would simply extend the docker compose. However, remember only one MongoDB Server (as Replika Set, Cluster or Single DB) can be used for Lowcoder as Meta-Data-Database. The other Databases which installation you would manage by the docker compose file, can get used as Lowcoder Data Sources - but need as all other Lowcoder Data Sources to get configured in the normal operating Lowcoder Software.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@yogeshvachhani@FalkWolsky

[8]ページ先頭

©2009-2025 Movatter.jp