GithubHelp home page GithubHelp logo

bellmit / services Goto Github PK

View Code? Open in Web Editor NEW

This project forked from electricaio/services

0.0 1.0 0.0 37.4 MB

A monorepo that holds all backend services

Java 98.54% Shell 1.10% Dockerfile 0.23% Smarty 0.14%

services's Introduction

Backend Services

Setup your environment

  1. Install Docker.
  2. Install Docker Compose.

Building your environment

  • Install Lombok plugin and enable annotation processing in your IDE.
  • Assemble project with Gradle:
./gradlew clean assemble
  • We use Checkstyle and Findbug plugins to check code-style. You can run it locally before PR:
./gradlew check

Or commend below if you want to skip tests:

./gradlew check -x test

Development Flow

Best Practices for committing code are documented on the wiki

Code coverage requirements

  1. Minimum code coverage requirement for the repo is 75%.
  2. We bump it upwards by 5% each week.
  3. Your PR cannot drop the code coverage by more than 1% at any point in time.

Build Docker Images

To build Docker images execute following:

./gradlew clean assemble && sh deploy/docker/build.sh

Running the functional tests locally

To run functional tests locally, you have to have running Postgres instance. Below is example how to start Postgres locally with all backend expected databases:

docker-compose -f deploy/docker-compose/postgres.yml up

And down it removing all data:

docker-compose -f deploy/docker-compose/postgres.yml down

Running the services cluster locally

Below is example how to start cluster locally with dev profile:

docker-compose -f deploy/docker-compose/cluster.yml up

And down it removing all containers and data:

docker-compose -f deploy/docker-compose/cluster.yml down

Running the integration tests locally

  1. build Docker images;
  2. start cluster locally;
  3. run integration tests with command below:
./gradlew :it-service:integrationTest -PexecIntegrationTest=true
  1. optionally down the cluster.

Micro services

This is a multi-module gradle build with each microservice running in it's own Docker container. Each microservice consists of 2 modules:

  • <service-name>-service-api
  • <service-name>-service

Questions?

Head to slack channel dev-backend to get your questions answered.

services's People

Contributors

ermunishsodhi avatar alekseypolukeev avatar mladibejn avatar inder avatar nick-tc avatar chrismccaw avatar inder-zz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.