Git Product home page Git Product logo

bean-seed's Introduction

Gitter CodeShip FOSSA Status

If you are planning to build a project with Microservices pattern and DevOps culture, you can use this source code.

In this source code, I built two services, one for Frontend AngularJS and Bootstrap, one for Backend ExpressJS and Mongoose. All services in this project is dockerized and pushed to Docker Hub. You can read Dockerfile in each service for further details. To create a new service, you just create a new directory, writing source code for that service and update docker-compose.yml file.

Run

The Orchestration of Project is written in docker-compose.yml file. So it is so easily to understand and run the project.

docker-compose up

Using Vagrant and Virtualbox

We also start from Virtual Machine layer with Vagrant.

vagrant up

After that, you can access the application via link: http://172.20.20.20

You can read Vagrantfile to understand what we need to prepare for VMs.

System Architecture

After running docker-compose up we will have a system as below:

Starting a Miroservices-DevOps Project with NodeJS and Docker

Contents

Part Title Git Tag
1 Starting with ExpressJS 1.0
2 Logger with Winston 1.1
4 Config Management with Node-Config 1.2
5 ExpressJS and Mongoose 2.0
6 Building Create User API 2.1
7 Adding Swagger Documents 2.2
8 Building Login API 2.3
9 Building Get User List/Detail API 2.4
10 Authorization all APIs 2.5
11 Unit Test 2.6
12 Building Config API 3.0
13 Using Cache 3.1
14 Using Queue 3.2
15 Starting AngularJS with Yeoman 4.0
16 Config Management for AngularJS 4.1
17 Building Login Page 4.2
18 Building Register Page 4.3
19 Building List User Page 4.4
20 Pagination with AngularJS and Bootstrap 4.5
21 Multiple Languages 4.6
22 AngularJS Unit Test 4.7
23 Building User Detail Page 4.8
24 Dockerize Aplication 5.0
25 Orchestration with Docker Compose 5.1

For Developer

Setup Backend

cd api-seed
npm install
# create local configuration file
cp config/default.json config/local.json
# edit local.json for match your environment

Run Backend

node index.js

Setup Frontend

cd site-seed
npm install
bower install
# create local configuration file
cp config/default.json config/local.json
# edit local.json for match your environment

Run Frontend with Grunt

grunt serve

Monitor & Logs

This starter project also fully supports monitor by using Telegraf, InfluxDB, Grafana and Kapacitor. Supports centralizing Logs with fluentd, Kibana and Elasticsearch.

Troubleshoot

You may meet some trouble with Elasticsearch 5.0+ (requires at least 4G RAM). And run command:

sysctl -w vm.max_map_count=262144

Documents

Tiếng Việt

  1. Tạo một API đầu tiên với NodeJS
  2. Quản lý Logs trong dự án NodeJS
  3. Quản lý Config trong dự án NodeJS
  4. Cài đặt và chạy thử MongoDB trên Ubuntu Server
  5. Bắt đầu với ExpressJS và Mongoose

License

FOSSA Status

bean-seed's People

Contributors

fossabot avatar thanhson1085 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bean-seed's Issues

Failed to initialize logging driver: dial tcp 74.125.224.72:24224: i/o timeout

Hey there,

this is an amazing work you've put there!

I tried to run it and I get:

(master)~/D/d/bean-seed ❯❯❯ docker-compose up
beanseed_elasticsearch_1 is up-to-date
redis is up-to-date
beanseed_influxdb_1 is up-to-date
beanseed_fluentd_1 is up-to-date
beanseed_site_1 is up-to-date
db is up-to-date
beanseed_kibana_1 is up-to-date
beanseed_kapacitor_1 is up-to-date
beanseed_grafana_1 is up-to-date
Recreating beanseed_apis_1
beanseed_telegraf_1 is up-to-date

ERROR: for apis  Cannot start service apis: Failed to initialize logging driver: dial tcp 74.125.224.72:24224: i/o timeout
ERROR: Encountered errors while bringing up the project.

Any idea?

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.