Skip to content

Commit

Permalink
docs: updated readme to include CouchDB.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisaveiro committed Jan 9, 2023
1 parent cb42ff4 commit c25e6fa
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 1 deletion.
96 changes: 95 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</h4>

<p align="center">
<a href="#tldr">TL;DR</a> •
<a href="#about">About</a> •
<a href="#disclaimer">Disclaimer</a> •
<a href="#getting-started">Getting Started</a> •
Expand All @@ -37,6 +38,26 @@
<a href="#license">License</a>
</p>

## <a id="tldr"></a> TL;DR

Want to learn or experiment with different database engines without requiring
to install additional dependencies? ***Localhost Databases*** is a collection
of Docker Compose files for relational and NoSQL databases.

#### Quick Start

1. Clone this repository.
2. Copy the DotEnv example file to create your DotEnv file and configure your
database's credentials and settings.
3. Starting a database Docker container is simple by providing the `-f` flag
for the docker compose command.

##### Docker Compose Command:

```bash
docker compose -f compose.database-name.yaml up -d
```

## About

This repository is a collection of Docker Compose files for relational and
Expand Down Expand Up @@ -178,6 +199,7 @@ part of this repository's collection:

- [Cassandra](#config-cassandra)
- [CockroachDB](#config-cockroachdb)
- [CouchDB](#config-couchdb)
- [DynamoDB Local](#config-dynamodb)
- [EdgeDB](#config-edgedb)
- [MariaDB](#config-mariadb)
Expand Down Expand Up @@ -269,7 +291,8 @@ Below is a screenshot of the settings used in TablePlus:

#### <a id="config-cockroachdb"></a> <ins>Configuring CockroachDB</ins>

[CockroachDB](https://www.cockroachlabs.com/) is a distributed database with standard SQL for cloud applications.
[CockroachDB](https://www.cockroachlabs.com/) is a distributed database with
standard SQL for cloud applications.

##### **Environment Variables**

Expand Down Expand Up @@ -350,6 +373,77 @@ Below is a screenshot of the DB Console:

---

#### <a id="config-couchdb"></a> <ins>CouchDB</ins>

[Apache CouchDB](https://couchdb.apache.org/) is an open-source document-oriented
NoSQL database, implemented in Erlang. CouchDB uses multiple formats and protocols
to store, transfer, and process its data. It uses JSON to store data, JavaScript
as its query language using MapReduce, and HTTP for an API.

##### **Environment Variables**

The CouchDB Local Docker Compose file uses the follow variables from the DotEnv
file.

```ini
#--------------------------------------------------------------------------
# CouchDB env
#--------------------------------------------------------------------------

COUCHDB_CONTAINER_NAME="${APP_NAME}_couchdb"

COUCHDB_PORT=5984

COUCHDB_USERNAME="${DB_USERNAME}"
COUCHDB_PASSWORD="${DB_PASSWORD}"
```

##### **Start & Stop Docker container**

To start the CouchDB Local container, you can run the following command:

```bash
docker compose -f compose.couchdb.yaml up -d
```

To stop the CouchDB Local container, you can run the following command:

```bash
docker compose -f compose.couchdb.yaml down
```

##### **Connect to Database**

Fauxton is a native web-based interface built into CouchDB. It provides a basic
interface to the majority of the functionality, including the ability to create,
update, delete and view documents and design documents. It provides access to
the configuration parameters, and an interface for initiating replication.To
connect to your EdgeDB CouchDB from your browser, you will need to provide the
following settings:

```ini
HOST=localhost
PORT="${COUCHDB_PORT}"

USER="${DB_USERNAME}"
PASSWORD="${DB_PASSWORD}"
```

Go to http://localhost:5984/_utils. Below is a screenshot of the Fauxton UI:

<p align="center">
<a>
<img
src="./images/browser-couchdb.png"
alt="CouchDB Fauxton UI"
width="50%">
</a>
<br>
<sub><sup>CouchDB Fauxton UI.</sup></sub>
</p>

---

#### <a id="config-dynamodb"></a> <ins>Configuring DynamoDB Local</ins>

[Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)
Expand Down
Binary file added images/browser-couchdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c25e6fa

Please sign in to comment.