Skip to content

Commit

Permalink
update Getting Started section in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
phpai committed Mar 25, 2019
1 parent 5cb2db5 commit 8d8c970
Showing 1 changed file with 47 additions and 20 deletions.
67 changes: 47 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,80 @@
# TruBudget-App
# TruBudget-App <!-- omit in TOC -->

[![build status](https://travis-ci.com/openkfw/TruBudget.svg?branch=master)](https://travis-ci.com/openkfw/TruBudget)
[![gitter chat](https://img.shields.io/badge/chat-on%20gitter-brightgreen.svg)](https://gitter.im/Tru-Community/community)

## Introduction
# Table of Contents <!-- omit in TOC -->

- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installing](#installing)
- [Build and Develop from Local Sources](#build-and-develop-from-local-sources)
- [More Information](#more-information)
- [FAQ](#faq)

# Introduction

TruBudget - a trusted public expenditure tool. A collaborative workflow tool and secured platform to track and coordinate the implementation of donor-funded investment projects.

## Getting Started
# Getting Started

These instructions will get you a copy of the project up and running on your local machine.

## Prerequisites

There are two options to run TruBudget either using the local sources or running the latest stable docker images.
- [Docker](https://www.docker.com/)
- [Docker-Compose](https://docs.docker.com/compose/)

First, you need to create a parameters file:
## Installing

The recommended option to run TruBudget is to use the latest stable docker images via docker-compose.
For more detailed information about the installation and the environment variables or alternative ways to setup TruBudget check out the [Installation Guide](./doc/wiki/Installation-Guide/Installation-Guide.md).

Setting required environment variables via `.env` file

```bash
cd path/to/trubudget-app
cp .env_example .env
```

Now open the file and do your changes. Make sure you set `ORGANIZATION` to your organization name (best not to use spaces), and `ORGANIZATION_VAULT_SECRET` and `ROOT_SECRET` to secret phrases that only people in your organization know.

For running TruBudget you have two options: you can either use existing images or your local checkout.
>Tip: If you want to checkout a certain version of TruBudget change the `TAG` environment variable. By default it is set to `TAG=master`.
### Stable Docker Images

Since running existing, tested images is generally more stable and also quicker, this is the recommended way to run TruBudget. Note that for accessing the image registry you'll need to put your registry password into a file called `DOCKER_REGISTRY_PASSWORD` in the checkout's root directory (i.e., where the `.env` files resides).
Run TruBudget:

```bash
sh scripts/master/start-master-node.sh
```

Additionally, make sure that the `.env` file contains the `TAG` variable set to the version you're going to run, for example: `TAG=v1.0.0-beta.3`.
If you run into any issues check out the [Installation Guide](./doc/wiki/Installation-Guide/Installation-Guide.md) for more detailed information.
This will start a prod and test instance of TruBudget (blockchain, api, frontend) and test data provisioning. Use `docker ps` to check on the running containers.

### Local Sources
```bash
➜ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
41c3453e505c trubudget/frontend:master "/bin/sh -c '/bin/as…" 5 minutes ago Up 5 minutes 0.0.0.0:80->80/tcp trubudget_frontend_1
5dacb07a93a3 trubudget/provisioning:master "npm start" 5 minutes ago Up 5 minutes trubudget_provision-test_1
296e0d16435c trubudget/provisioning:master "npm start" 5 minutes ago Up 5 minutes trubudget_provision-prod_1
c6426a0ee5f5 trubudget/api:master "/bin/sh -c 'npm sta…" 5 minutes ago Up 5 minutes trubudget_testapi_1
27d71e0678d0 trubudget/api:master "/bin/sh -c 'npm sta…" 5 minutes ago Up 5 minutes trubudget_api_1
760e9736c0dc trubudget/blockchain:master "npm start" 5 minutes ago Up 5 minutes 7447/tcp, 8000/tcp trubudget_master_1
a8b3442490b5 trubudget/blockchain:master "npm start" 5 minutes ago Up 5 minutes 7447/tcp, 8000/tcp trubudget_testmaster_1
```

If you don't have the registry password yet, or if you want to test local modifications, you can also run TruBudget from disk:
Once the application and the provisioning is done, you can visit the application at:

```bash
sh scripts/local/start-master-node.sh
```
http://localhost:80
```

# Build and Develop from Local Sources

If you run into any issues check out the [Installation Guide](./doc/wiki/Installation-Guide/Installation-Guide.md) for more detailed information.
Checkout the [Contributer Guide](https://github.com/openkfw/TruBudget/blob/master/doc/wiki/Contributer-Guide/Contributer-Guide.md) to learn how to set up your environment to start developing and debugging the TruBudget application.

## More Information
# More Information

Check out our [**Trubudget-Wiki**](./doc/README.md) to find out how Trubudget works.

## FAQ
# FAQ

| Description | Link |
| :-------------------- | :---------------------------------------------------------------------------------------------------------------- |
Expand Down

0 comments on commit 8d8c970

Please sign in to comment.