openblocks-dev / openblocks

🔥 🔥 🔥 The Open Source Retool Alternative
https://cloud.openblocks.dev
GNU Affero General Public License v3.0
5.67k stars 335 forks source link

How to modify the Docker file to install and configure PostgreSQL instead of MongoDB? #388

Open yogeshvachhani opened 1 year ago

yogeshvachhani commented 1 year ago

I want to try out OpenBlocks.

I have setup Docker but when I checked the yml file I observed it installs MongoDB. But instead of MongoDB I want to use PostgreSQL and MySQL.

How to add these two RDBMS and build the docker image?

as-shura commented 1 year ago

Have a look at ferretdb. It is a layer on top of Postgres written in Go which is a dead replacement for MongoDB.

version: "3"

services:

  ferretdb:
    image: ghcr.io/ferretdb/ferretdb
    restart: on-failure
    ports:
      - 27017:27017
    expose:
      - 27017
    environment:
      - FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/ferretdb
      - FERRETDB_HANDLER=pg
    networks:
      - databases

networks:
  databases:
    external:
      name: databases