• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    JavaScript
  • License
    Mozilla Public Li...
  • Created almost 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example microservices implementation using Node.js

Node.js Microservices in Containers with ContainerPilot

Example microservices implementation using Node.js and Docker. Below is an architectural diagram depicting the composition of services that make up the project. When everything is working a frontend web application is accessible that will display a set of graphs using sensor data. The sensor data is either generated by the smartthings microservice or is sent to the microservice from a SmartThings hub running a Sensor SmartApp.

Usage

Development

In local development you can start the microservices by running

$ docker-compose -f local-compose.yml up -d

Then scale up the frontend by a number of instances (3 in this case):

$ docker-compose -f local-compose.yml scale frontend=3

Navigate to http://localhost in your browser and you will see 3 charts. As data flows into the serializer from the various sensors you will start to see data appear on the charts in real-time.

To check that all of the local containers are running you can execute the ps command by running

$ docker-compose -f local-compose.yml ps

Production

When deploying to Triton, first setup your environment then run docker-compose. Below is an example of setting your environment variables then pushing the code to production.

$ ./setup.sh
$ eval "$(triton env)"
$ docker-compose up -d
$ triton instance get nodejsexample_traefik_1

Credits

This project is inspired by various microservices workshops and trainings. In no particular order, they are:

More Repositories

1

mysql

Implementation of the autopilot pattern for MySQL
Python
172
star
2

wordpress

A robust and highly-scalable implementation of WordPress in Docker using the Autopilot Pattern
Shell
158
star
3

workshop

Self-assembling microservices demo
JavaScript
88
star
4

consul

Implementation of the Autopilot Pattern for HashiCorp's Consul
Shell
73
star
5

touchbase

Touchbase stack demonstrating the autopilot pattern
Shell
59
star
6

nginx

An Nginx container for container-native deployment and automatic backend discovery
Shell
57
star
7

elk

Elasticsearch-Logstash-Kibana (ELK) stack demonstrating the autopilot pattern
Shell
55
star
8

jenkins

Extension of official Jenkins Docker image that supports Joyent's Triton for elastic slave provisioning
Shell
43
star
9

mongodb

A robust and highly-scalable implementation of MongoDB in Docker using the Autopilot Pattern
Python
42
star
10

cloudflare

Automatically update an external DNS provider when a containerized service's IPs change
Shell
37
star
11

vault

Implementation of the Autopilot Pattern for HashiCorp's Vault
Shell
33
star
12

hello-world

hello world example application
Shell
32
star
13

postgres

Implementation of the Autopilot Pattern for Postgres
JavaScript
17
star
14

couchbase

Shell
16
star
15

redis

Redis on the Autopilot Pattern
Shell
16
star
16

prometheus

Implementation of the Autopilot Pattern for a Prometheus.io server
Shell
15
star
17

etcd

A service for autodiscovery and configuration of applications running in containers
Shell
12
star
18

nats

NATS on Autopilot
Shell
8
star
19

nfsserver

Shell
7
star
20

elasticsearch

Elasticsearch stack demonstrating the autopilot pattern
Shell
7
star
21

rethinkdb

RethinkDB on Autopilot
Shell
6
star
22

memcached

Shell
6
star
23

influxdb

Implementation of the Autopilot Pattern for InfluxDB
Shell
4
star
24

testing

Tools for automated testing of Autopilot Pattern applications
Python
3
star
25

ghost

Implementation of the Autopilot Pattern for Ghost
Dockerfile
2
star
26

minio-manta

Joyent exclusive Minio Manta gateway run by ContainerPilot and the Autopilot Pattern
Makefile
2
star
27

cassandra

2
star
28

skel

Skeletal structure of an Autopilot Pattern application
2
star
29

mongo-express

Mongo-Express implemented in Docker using the Autopilot Pattern
Shell
2
star
30

docker-registry

1
star
31

haproxy

Work in progress, not stable, expect force pushes of this repo
1
star
32

telegraf

Work in progress, not stable, expect force pushes of this repo
1
star
33

grafana

Work in progress, not stable, expect force pushes of this repo
1
star