This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).


License
AGPL-3.0
Install
npm install bonde-styleguide@0.15.1-alpha.3

Documentation

BONDE

BONDE Logo

Build Status Opened Issues Count
Docker Automated Deploy Docker Build Status
Licence Conventional Commits

Greenkeeper badge

Recommended Reading

Configuration

Bonde Client app depends on the host name to decide how to behave, considering this you should setup a wildcard DNS domain on the development environment.

Or you could simple add to your /etc/hosts the following names:

127.0.0.1	app.bonde.devel bonde.devel api.bonde.devel data.bonde.devel db.devel keyval.devel meurio.bonde.org

Install

Requirements

$ git --version
git version 2.7.4
$ docker -v
Docker version 17.07.0-ce-rc1-mac21 (18848), build 9f75bcddf8
$ docker-compose -v
docker-compose version 1.15.0, build e12f3b9

One-line

# Install
sh <(curl -s https://raw.githubusercontent.com/nossas/bonde-install/master/install.sh)

# Uninstall
sh <(curl -s https://raw.githubusercontent.com/nossas/bonde-install/master/uninstall.sh)

Manual

Docker images from services used by BONDE ecosystem must be downloaded at the first time container start.

mkdir code/ && cd code/
git clone git@github.com:nossas/bonde-client.git
cd bonde-client
docker-compose up -d                        # download, build and start containers
docker-compose exec api-v1 rake db:migrate  # sync db
docker-compose exec api-v1 rake db:seed     # fill db
docker-compose restart api-v2               # refresh graphql cache schema

To configure packages, we use .env files, examples could be founded at each package.

With help from Yarn and Lerna, install dependencies:

Local Development

npm install
./node_modules/.bin/lerna bootstrap
./node_modules/.bin/lerna run dev --parallel

And you are done!

Tests

As simples as:

./node_modules/.bin/lerna run test --parallel

Now sit and relax.

If you want to test a single file you can temporarily change the first line of webpack.test.config.js to:

var context = require.context('./app/scripts/tests', true, /MyComponentTest\.jsx/);

Useful commands

./node_modules/.bin/lerna run build --parallel
docker-compose exec api-v2 /bin/bash  # Open bash inside ruby container
docker-compose up --build             # Force build from images

To cleanup all volumes, images and containers run:

docker rmi $(docker images -a -q)
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
docker volume rm $(docker volume ls -f dangling=true -q)

And you are done!

Restore Database

export DSN_SRC=postgres://postgres:3x4mpl3@localhost:5432/bonde
export DSN_DEST=postgres://postgres:3x4mpl3@localhost:5432/bonde
./packages/bonde-admin/tools/restore-db.sh

Links