{"id":13455394,"url":"https://github.com/apache/couchdb","last_synced_at":"2025-05-12T13:22:24.359Z","repository":{"id":574304,"uuid":"206417","full_name":"apache/couchdb","owner":"apache","description":"Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability","archived":false,"fork":false,"pushed_at":"2025-05-07T18:39:22.000Z","size":46548,"stargazers_count":6513,"open_issues_count":317,"forks_count":1054,"subscribers_count":233,"default_branch":"main","last_synced_at":"2025-05-07T18:39:36.946Z","etag":null,"topics":["big-data","cloud","content","couchdb","database","erlang","http","javascript","network-client","network-server"],"latest_commit_sha":null,"homepage":"https://couchdb.apache.org/","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README-DEV.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/build_js.escript","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-05-21T02:03:38.000Z","updated_at":"2025-05-07T18:39:26.000Z","dependencies_parsed_at":"2023-01-16T17:48:06.628Z","dependency_job_id":"f2036fae-0cda-4bd0-aac1-452b4ea7db92","html_url":"https://github.com/apache/couchdb","commit_stats":{"total_commits":12715,"total_committers":280,"mean_commits":"45.410714285714285","dds":0.9030279197797877,"last_synced_commit":"f6c66d048b6de97109717510e6ba7165c0526108"},"previous_names":[],"tags_count":145,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fcouchdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fcouchdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fcouchdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fcouchdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/couchdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745207,"owners_count":21957322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-data","cloud","content","couchdb","database","erlang","http","javascript","network-client","network-server"],"created_at":"2024-07-31T08:01:04.840Z","updated_at":"2025-05-12T13:22:24.352Z","avatar_url":"https://github.com/apache.png","language":"Erlang","readme":"Apache CouchDB DEVELOPERS\n=========================\n\nBefore you start here, read `\u003cINSTALL.Unix.md\u003e`_ (or\n`\u003cINSTALL.Windows.md\u003e`_) and follow the setup instructions including\nthe installation of all the listed dependencies for your system.\n\nOnly follow these instructions if you are building from a source checkout.\n\nIf you're unsure what this means, ignore this document.\n\nDependencies\n------------\n\nYou need the following to run tests:\n\n* `Python 3               \u003chttps://www.python.org/\u003e`_\n* `Elixir                 \u003chttps://elixir-lang.org/\u003e`_\n\nYou need the following optionally to build documentation:\n\n* `Sphinx                 \u003chttps://www.sphinx-doc.org/\u003e`_\n* `GNU help2man           \u003chttp://www.gnu.org/software/help2man/\u003e`_\n* `GnuPG                  \u003chttp://www.gnupg.org/\u003e`_\n\nYou need the following optionally to build releases:\n\n* `md5sum                 \u003chttp://www.microbrew.org/tools/md5sha1sum/\u003e`_\n* `sha1sum                \u003chttp://www.microbrew.org/tools/md5sha1sum/\u003e`_\n\nYou need the following optionally to build Fauxton:\n\n* `nodejs                 \u003chttp://nodejs.org/\u003e`_\n* `npm                    \u003chttps://www.npmjs.com/\u003e`_\n\nYou will need these optional dependencies installed if:\n\n* You are working on the documentation, or\n* You are preparing a distribution archive\n\nHowever, you do not need them if:\n\n* You are building from a distribution archive, or\n* You don't care about building the documentation\n\nIf you intend to build Fauxton, you will also need to install its\ndependencies. After running ``./configure`` to download all of the\ndependent repositories, you can read about required dependencies in\n`its readme\n\u003chttps://github.com/apache/couchdb-fauxton/blob/main/readme.md\u003e`_. Typically,\ninstalling ``npm`` and node.js are sufficient to enable a Fauxton\nbuild.\n\nHere is a list of *optional* dependencies for various operating systems.\nInstallation will be easiest, when you install them all.\n\nDocker\n~~~~~~\n\nCouchDB maintains a ``Dockerfile`` based on Debian that includes all\nthe dependencies noted above in the `.devcontainer \u003chttps://github.com/apache/couchdb/tree/main/.devcontainer\u003e`_\nfolder.\n\nThe ``Dockerfile`` can be used on its own, or together with the\nassociated ``devcontainer.json`` file to quickly provision a\ndevelopment environment using `GitHub Codespaces \u003chttps://github.com/features/codespaces\u003e`_\nor `Visual Studio Code \u003chttps://code.visualstudio.com/docs/remote/containers\u003e`_.\n\n\n.. image:: https://img.shields.io/static/v1?label=Remote%20-%20Containers\u0026message=Open\u0026color=blue\u0026logo=visualstudiocode\n    :target: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb\n\nIf you already have VS Code and Docker installed, you can click the\nbadge above or `here\n\u003chttps://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/apache/couchdb\u003e`_\nto get started. Clicking these links will cause VS Code to\nautomatically install the Remote - Containers extension if needed,\nclone the source code into a container volume, and spin up a dev\ncontainer for use.\n\nThis ``devcontainer`` will automatically run ``./configure \u0026\u0026 make``\nthe first time it is created.  While this may take some extra time to\nspin up, this tradeoff means you will be able to run things like\n``./dev/run``, ``./dev/run --admin=admin:admin``, ``./dev/run\n--with-admin-party-please``, and ``make check`` straight away.\nSubsequent startups should be quick.\n\n\nDebian-based (inc. Ubuntu) Systems\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n    sudo apt-get install help2man python-sphinx gnupg nodejs npm \\\n         python3 python3-venv\n\nGentoo-based Systems\n~~~~~~~~~~~~~~~~~~~~\n\n::\n\n    sudo emerge gnupg coreutils pkgconfig help2man sphinx python\n    sudo pip install hypothesis requests nose\n\nCentos 7 and RHEL 7\n~~~~~~~~~~~~~~~~~~~\n\n::\n\n    sudo yum install help2man python-sphinx python-docutils \\\n        python-pygments gnupg nodejs npm\n\n\nMac OS X\n~~~~~~~~\n\nInstall `Homebrew \u003chttps://brew.sh/\u003e`_, if you do not have it already.\n\nUnless you want to install the optional dependencies, skip to the next section.\n\nInstall what else we can with Homebrew::\n\n    brew install help2man gnupg md5sha1sum node python\n\nIf you don't already have pip installed, install it::\n\n    sudo easy_install pip\n\nNow, install the required Python packages::\n\n    sudo pip install sphinx docutils pygments sphinx_rtd_theme\n\nFreeBSD\n~~~~~~~\n\n::\n\n    pkg install help2man gnupg py27-sphinx node\n    pip install nose requests hypothesis\n\nWindows\n~~~~~~~\n\nFollow the instructions in `\u003cINSTALL.Windows.md\u003e`_ and build all\ncomponents from source, using the same Visual C++ compiler and\nruntime.\n\nConfiguring\n-----------\n\nConfigure the source by running::\n\n    ./configure\n\nIf you intend to run the test suites with Clouseau::\n\n    ./configure --with-clouseau\n\nIf you don't want to build Fauxton or documentation specify\n``--disable-fauxton`` and/or ``--disable-docs`` arguments for ``configure`` to\nignore their build and avoid any issues with their dependencies.\n\nSee ``./configure --help`` for more information.\n\nDeveloping\n----------\n\nFormatting\n~~~~~~~~~~\n\nThe ``erl`` files in ``src`` are formatted using erlfmt_. The checks are run\nfor every PR in the CI. To run the checks locally, run ``make erlfmt-check``.\nTo format the ``erl`` files in ``src``, run ``make erlfmt-format``.\nTo use ``erlfmt`` for specific files only, use the executable ``bin/erlfmt``\nthat is installed by ``configure``.\n\nPython files throughout the repository should conform to (PEP\n8-compliant) formatting rules as specified by black_.  Similarly to\n``erlfmt``, the related checks are run for every PR in the CI.  The\nsame checks could also be run locally via ``make python-black``.\nFiles can be automatically formatted by ``make python-black-update``.\n\n.. _erlfmt: https://github.com/WhatsApp/erlfmt\n.. _black: https://github.com/psf/black\n\nTesting\n-------\n\nTo run all the tests use run::\n\n    make check\n\nYou can also run each test suite individually via the ``eunit``, ``mango-test``,\n``elixir``, and ``weatherreport-test`` targets::\n\n    make eunit\n    make mango-test\n    make elixir\n    make weatherreport-test\n\nErlang Unit Tests\n~~~~~~~~~~~~~~~~~\n\nIf you need to run specific Erlang tests, you can pass special \"options\"\nto make targets::\n\n    # Run tests only for couch and chttpd apps\n    make eunit apps=couch,chttpd\n\n    # Run only tests from couch_btree_tests suite\n    make eunit apps=couch suites=couch_btree\n\n    # Run only only specific tests\n    make eunit tests=btree_open_test,reductions_test\n\n    # Ignore tests for specified apps\n    make eunit skip_deps=couch_log,couch_epi\n\nThe ``apps``, ``suites``, ``tests`` and ``skip_deps`` could be\ncombined in any way. These are mimics to ``rebar eunit`` arguments. If\nyou're not satisfied by these, you can use the ``EUNIT_OPTS`` variable\nto specify exact ``rebar eunit`` options::\n\n    make eunit EUNIT_OPTS=\"apps=couch,chttpd\"\n\nElixir Integration Tests\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nAll the Elixir-based integration tests could be by the `elixir`\ntarget::\n\n    make elixir\n\nThere is an additional suite for Dreyfus, which is not run\nautomatically by either the ``elixir`` or the ``check`` target\nbut it could be done manually via the corresponding target::\n\n    make elixir-search\n\nNote that this requires Clouseau to be configured for running, see\nabove.\n\nMango Integration Tests\n~~~~~~~~~~~~~~~~~~~~~~~\n\nTests for the Mango interface can be run individually with the help of\nthe ``mango-test`` target and they can be narrowed down to specific\ntest suites via the ``MANGO_TEST_OPTS`` variable::\n\n    make mango-test \\\n      MANGO_TEST_OPTS=\"--pretty-assert --verbose 03-operator-test\"\n\nThe value of the ``MANGO_TEST_OPTS`` variable will be passed down to\nthe `Nose 2 \u003chttps://nose2.io/\u003e`_ testing framework which is used for\nthe implementation.  Consult its documentation for more information.\n\nTests that rely on text indexes are run only if the ``search`` feature\nis reported to be available (i.e. a working Clouseau instance is\nconfigured and working), otherwise they will be skipped.\n\nNote that the databases that are created during the tests will be all\nremoved after each of the suites completed.  However, with the help of\nthe ``MANGO_TESTS_KEEP_DBS`` environment variable, it can be requested\nto keep those databases around for further investigation::\n\n    MANGO_TESTS_KEEP_DBS=please \\\n      make mango-test MANGO_TEST_OPTS='03-operator-test'\n\nRunning Clouseau\n~~~~~~~~~~~~~~~~\n\nWhen configured with the ``./configure`` script, the ``./dev/run``\nscript is capable of launching Clouseau instances alongside the\nCouchDB nodes and hooking them up.  This is what the ``mango-test``\nand ``elixir-search`` targets also use to run their respective test\nsuites, and let Clouseau automatically manage them.\n\nAlthough the ``./configure`` and the ``./dev/run`` scripts try to take\ncare of the details of the Clouseau deployment, it is still the\nresponsibility of the user to provide a suitable Java environment for\nrunning.  Clouseau can run with JRE 1.7 and 1.8 only.  Also, when\nNouveau is in use, which uses a more recent Java environment, the old\nJDK has to be installed separately and the ``CLOUSEAU_JAVA_HOME``\nenvironment variable has to be set to point its location.\n\nFortunately, the ```asdf`` tool \u003chttps://asdf-vm.com/\u003e` provides a\nconvenient way to install old versions of JDK through its ```java``\nplugin \u003chttps://github.com/halcyon/asdf-java\u003e`::\n\n    asdf plugin add java\n\nThen use ``asdf`` to install it::\n\n    asdf install java zulu-jre-8.74.0.17\n\nFinally, use ``asdf`` to set the ``CLOUSEAU_JAVA_HOME`` environment\nvariable::\n\n    export CLOUSEAU_JAVA_HOME=$(asdf where java zulu-jre-8.74.0.17)\n\nIf the use of ``asdf`` is not an option, `the Zulu site\n\u003chttps://cdn.azul.com/zulu/bin/\u003e` could be used directly to get the\ndistribution package for the appropriate JRE version.  But this is\njust one of the possibilities to access installers for old Java\nenvironments.\n\nOnce both Clouseau and the corresponding Java environment are set,\nthey are not put in use automatically.  In order to do so, the\n``./dev/run`` script needs to be run with Clouseau enabled as\nfollows::\n\n    dev/run --with-clouseau\n\nWhen a specific Erlang cookie string is needed, the\n``--erlang-cookie`` flag could be used to configure CouchDB and\nClouseau to work with that::\n\n    dev/run --with-clouseau --erlang-cookie=brumbrum\n\nIt is possible to override Clouseau's location per invocation of\n``./dev/run`` in case some other version needs to be exercised for the\nmoment.  This can be done with the help of the ``--clouseau-dir``\nflag.  The specified location could be either an unpacked bundle of\nJAR files or a git clone of the Clouseau source code repository::\n\n    dev/run --with-clouseau --clouseau-dir $HOME/git/clouseau.wip\n\nThrough the ``CLOUSEAU_DIR`` variable the same could be forwarded to the\nrespective test targets, e.g. ``mango-test``::\n\n    make mango-test CLOUSEAU_DIR=$HOME/git/clouseau.wip\n\nThis can even be done if there was no local Clouseau deployment\nconfigured previously.  Mind that this will require building Clouseau\nfrom source, which causes the nodes start up somewhat slower.  It also\nrequires JDK 1.7 and Apache Maven 3.8 to be present, that is why it is\nimportant the set the ``CLOUSEAU_JAVA_HOME`` and the\n``CLOUSEAU_M2_HOME`` environment variables accordingly, for instance::\n\n    asdf install java zulu-7.56.0.11\n    asdf plugin add maven\n    asdf install maven 3.8.8\n    export CLOUSEAU_JAVA_HOME=$(asdf where java zulu-7.56.0.11)\n    export CLOUSEAU_M2_HOME=$(asdf where maven 3.8.8)\n\nStatic Code Analysis\n~~~~~~~~~~~~~~~~~~~~\n\nCode analyzer could be run by::\n\n    make dialyze\n\nIf you need to analyze only specific apps, you can specify them in familiar way\n::\n\n    make dialyze apps=couch,couch_epi\n\nSee ``make help`` for more info and useful commands.\n\nPlease report any problems to the `developer's mailing list\n\u003chttps://lists.apache.org/list.html?dev@couchdb.apache.org\u003e`_.\n\nReleasing\n---------\n\nThe release procedure is documented here::\n\n    https://cwiki.apache.org/confluence/display/COUCHDB/Release+Procedure\n\nUnix-like Systems\n~~~~~~~~~~~~~~~~~\n\nA release tarball can be built by running::\n\n    make dist\n\nAn Erlang CouchDB release includes the full Erlang Run Time System and\nall dependent applications necessary to run CouchDB, standalone. The\nrelease created is completely relocatable on the file system, and is\nthe recommended way to distribute binaries of CouchDB. A release can be\nbuilt by running::\n\n    make release\n\nThe release can then be found in the ``rel/couchdb`` directory.\n\nMicrosoft Windows\n~~~~~~~~~~~~~~~~~\n\nThe release tarball and Erlang CouchDB release commands work on\nMicrosoft Windows the same as they do on Unix-like systems. To create\na full installer, the separate `couchdb-glazier repository\n\u003chttps://github.com/apache/couchdb-glazier\u003e`_ is required.  Full\ninstructions are available in that repository's ``README`` file.\n","funding_links":[],"categories":["Javascript","Databases","Erlang","Applications","Uncategorized","Database","数据库管理系统","Back-End Development","应用","NoSQL"],"sub_categories":["Development","Uncategorized","Document-Oriented Database","网络服务_其他","开发"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fcouchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fcouchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fcouchdb/lists"}