Coder Social home page Coder Social logo

dongbinghua / ferretdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ferretdb/ferretdb

0.0 0.0 0.0 5.32 MB

A truly Open Source MongoDB alternative

Home Page: https://www.ferretdb.io

License: Apache License 2.0

JavaScript 0.67% Go 99.12% CSS 0.07% Dockerfile 0.12% Makefile 0.02%

ferretdb's Introduction

FerretDB

Go Reference Go Integration Docker codecov

FerretDB (previously MangoDB) was founded to become the de-facto open-source substitute to MongoDB. FerretDB is an open-source proxy, converting the MongoDB 6.0+ wire protocol queries to SQL - using PostgreSQL as a database engine.

Why do we need FerretDB?

MongoDB was originally an eye-opening technology for many of us developers, empowering us to build applications faster than using relational databases. In its early days, its ease-to-use and well-documented drivers made MongoDB one of the simplest database solutions available. However, as time passed, MongoDB abandoned its open-source roots; changing the license to SSPL - making it unusable for many open source and early-stage commercial projects.

Most MongoDB users do not require any advanced features offered by MongoDB; however, they need an easy-to-use open-source database solution. Recognizing this, FerretDB is here to fill that gap.

Scope and current state

FerretDB will be compatible with MongoDB drivers and will strive to serve as a drop-in replacement for MongoDB 6.0+.

Currently, the project is in its early stages and welcomes all contributors. See our public roadmap, a list of known differences with MongoDB, and contributing guidelines.

Quickstart

These steps describe a quick local setup. They are not suitable for most production use-cases because they keep all data inside containers and don't encrypt incoming connections. For more configuration options check Configuration flags and variables page.

  1. Store the following in the docker-compose.yml file:

    services:
      postgres:
        image: postgres
        container_name: postgres
        ports:
          - 5432:5432
        environment:
          - POSTGRES_USER=username
          - POSTGRES_PASSWORD=password
          - POSTGRES_DB=ferretdb
    
      ferretdb:
        image: ghcr.io/ferretdb/ferretdb:latest
        container_name: ferretdb
        restart: on-failure
        ports:
          - 27017:27017
        environment:
          - FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/ferretdb
    
    networks:
      default:
        name: ferretdb

    postgres container runs PostgreSQL that would store data. ferretdb runs FerretDB.

  2. Fetch the latest version of FerretDB with docker compose pull. Afterwards start services with docker compose up -d.

  3. If you have mongosh installed, just run it to connect to FerretDB. It will use credentials passed in mongosh flags or MongoDB URI to authenticate to the PostgreSQL database. You'll also need to set authMechanism to PLAIN. The example URI would look like:

    mongodb://username:[email protected]/ferretdb?authMechanism=PLAIN
    

    See Security Authentication for more details.

    If you don't have mongosh, run the following command to run it inside the temporary MongoDB container, attaching to the same Docker network:

    docker run --rm -it --network=ferretdb --entrypoint=mongosh mongo "mongodb://username:password@ferretdb/ferretdb?authMechanism=PLAIN"

You can also install with FerretDB with the .deb and .rpm packages provided for each release.

Building and packaging

We strongly advise users not to build FerretDB themselves. Instead, use Docker images or .deb and .rpm packages provided by us. If you want to package FerretDB for your operating system or distribution, the recommended way is to use the build-release task; see our instructions for contributors for more details. FerretDB could also be built as any other Go program, but a few generated files and build tags could affect it. See there for more details.

Documentation

Community

If you want to contact FerretDB Inc., please use this form.

ferretdb's People

Contributors

aleksi avatar rumyantseva avatar noisersup avatar fashander avatar chilagrow avatar seeforschauer avatar dependabot[bot] avatar ribaraka avatar ekalinin avatar fenogentov avatar b1ron avatar opensauce avatar gevorgyg avatar doodgematvey avatar pboros avatar ptrfarkas avatar alphab avatar thuan1412 avatar ravilushqa avatar klokar avatar fcoury avatar peakle avatar jyz0309 avatar muyouming avatar folex avatar ferretdb-bot avatar ronaudinho avatar agneum avatar ae-govau avatar narqo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.