- Notifications
You must be signed in to change notification settings - Fork254
How to add MySQL and PostgreSQL to Docker#160
-
I checked the Docker configuration/docker-compose file in that only MongoDB is getting installed. I want to install two other databases.
How to modify the file and configure these two RDBMS? Regards, Yogesh |
BetaWas this translation helpful?Give feedback.
All reactions
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
-
Typically you would only add this as new sections to the docker-compose file. For MySQL:
And Postgres:
These are just examples. |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
Would it be possible to define Environment variables which LC would pickup for connecting with Other Database services added? |
BetaWas this translation helpful?Give feedback.
All reactions
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Can add another instance of Mongo? |
BetaWas this translation helpful?Give feedback.
All reactions
-
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. |
BetaWas this translation helpful?Give feedback.