Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
feat(new scripts and contributing.md): added scripts to init and clea…
Browse files Browse the repository at this point in the history
…nup couchdb

Added couchdb-init.sh to initialize couchdb and couchdb-cleanup.sh to cleanup couchdb according to
instructions in CONTRIBUTING.md. I also updated the instructions in CONTRIBUTING.md to use those
scripts.
  • Loading branch information
tobireuen committed Aug 20, 2020
1 parent 6f74103 commit a331d62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Expand Up @@ -18,14 +18,14 @@ root of this project to launch CouchDB. Below are the steps:

1. Start [Docker](https://docs.docker.com/get-docker/). Install it if you don't have it yet.
2. Install [Docker Compose](https://docs.docker.com/compose/install/) if you don't have it yet.
3. Run `docker-compose up --build -d` in the root directory.
3. Run `./couchdb/couchdb-init.sh` in the root directory.

This should launch a new CouchDB instance on `http://localhost:5984`, create system database, configure CouchDB as Single Node, enable CORS, create `hospitalrun` database, create a default admin with a username of `admin` and password of 'password', create a sample user with a username of `username` and password of 'password' to use new login page [#2137](https://github.com/HospitalRun/hospitalrun-frontend/pull/2137).

Go to `http://localhost:5984/_utils` in your browser to view Fauxton and perform administrative tasks.

**_Cleanup_**
To delete the development database, go to the root of the project and run `docker-compose down -v --rmi all --remove-orphans`
To delete the development database, go to the root of the project and run `./couchdb/couchdb-cleanup.sh`

### Install dependencies & start the application

Expand Down
3 changes: 3 additions & 0 deletions couchdb/couchdb-cleanup.sh
@@ -0,0 +1,3 @@
#!/bin/sh

docker-compose down -v --rmi all --remove-orphans
3 changes: 3 additions & 0 deletions couchdb/couchdb-init.sh
@@ -0,0 +1,3 @@
#!/bin/sh

docker-compose up --build -d

0 comments on commit a331d62

Please sign in to comment.