This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2e7b37
commit bbdebb9
Showing
4 changed files
with
204 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,62 @@ | ||
# native-x | ||
# The NativeX Project | ||
|
||
This project Monorepo contains all the services in use in the NativeX project. | ||
|
||
## Intro | ||
|
||
The shared core services, such as databases, search, and message queuing can be booted by executing `yarn start` in the root of this project. This will boot up a docker-compose environment and virtual network for other project services to join. Please note -- you **must** have the shared services started before running any other services. | ||
|
||
### Testing | ||
|
||
All services within this project **MUST** be tested in isolation. Each project has a separate docker-compose testing environment, and the following commands are available in all services: | ||
- `yarn start` - Brings the service online and links into the shared core services network. | ||
- `yarn stop` - Brings the service offline | ||
- `yarn test` - Runs the tests associated with each service in an *isolated* environment | ||
|
||
### Versioning, Continuous Integration & Deployment | ||
|
||
??? | ||
|
||
## Services | ||
|
||
### Shared Services | ||
|
||
The shared services for this project can be started by executing `yarn start` from the project root. The following environment variables can be overridden by adding them to `/.env`: | ||
``` | ||
NATS_CLIENT_PORT | ||
NATS_MONITOR_PORT | ||
MONGO_PORT | ||
ES_NODE_PORT | ||
ES_TRANSPORT_PORT | ||
ES_KIBANA_PORT | ||
``` | ||
The services currently included are | ||
- `nats` - A high performance message queue utilized by `moleculer` microservice clients | ||
- `redis` - A key-value store | ||
- `mongo` - A BSON document store | ||
- `elasticsearch` - A Lucene-based search service | ||
|
||
### graph | ||
An Apollo/GraphQL/Express server providing CRUD for NX data. | ||
|
||
[View service documentation](./graph#readme) | ||
|
||
### app | ||
An ember application for managing NX data | ||
|
||
[View service documentation](./app#readme) | ||
|
||
### web | ||
A NextJS web frontend for displaying NX data | ||
|
||
[View service documentation](./web#readme) | ||
|
||
### accounts | ||
A moleculer-based microservice for managing NX accounts | ||
|
||
[View service documentation](./accounts#readme) | ||
|
||
### onboarding | ||
An Apollo/GraphQL/Express server for creating accounts and managing infrastructure | ||
|
||
[View service documentation](./onboarding#readme) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
version: '3.5' | ||
networks: | ||
nativex: | ||
name: nativex | ||
|
||
services: | ||
nats: | ||
image: nats:latest | ||
ports: | ||
- "${NATS_CLIENT_PORT-4222}:4222" | ||
- "${NATS_MONITOR_PORT-8222}:8222" | ||
networks: [ nativex ] | ||
|
||
redis: | ||
image: redis:alpine | ||
networks: [ nativex ] | ||
|
||
mongo: | ||
image: mongo:3.6 | ||
command: --quiet | ||
volumes: | ||
- mongo:/data/db | ||
ports: | ||
- "${MONGO_PORT-8101}:27017" | ||
networks: [ nativex ] | ||
|
||
elasticsearch: | ||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3 | ||
environment: | ||
- cluster.name=docker-cluster | ||
- bootstrap.memory_lock=true | ||
- discovery.type=single-node | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
- "plugin.mandatory: analysis-phonetic" | ||
- "logger.level=WARN" | ||
volumes: | ||
- esdata:/usr/share/elasticsearch/data | ||
- esplug:/usr/share/elasticsearch/plugins | ||
ports: | ||
- "${ES_NODE_PORT-8102}:9200" | ||
- "${ES_TRANSPORT_PORT-8103}:9300" | ||
depends_on: | ||
- elasticsearch-plugins | ||
networks: [ nativex ] | ||
|
||
elasticsearch-plugins: | ||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3 | ||
entrypoint: sh -c 'test -d "plugins/analysis-phonetic" || bin/elasticsearch-plugin install -s analysis-phonetic' | ||
tty: true | ||
volumes: | ||
- esplug:/usr/share/elasticsearch/plugins | ||
|
||
elasticsearch-kibana: | ||
image: docker.elastic.co/kibana/kibana-oss:6.2.3 | ||
environment: | ||
- server.name=kibana | ||
- ELASTICSEARCH_URL=http://elasticsearch:9200 | ||
- LOGGING_QUIET=true | ||
ports: | ||
- "${ES_KIBANA_PORT-8104}:5601" | ||
depends_on: | ||
- elasticsearch | ||
networks: [ nativex ] | ||
|
||
volumes: | ||
mongo: {} | ||
esdata: {} | ||
esplug: {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "nativex", | ||
"version": "1.0.0", | ||
"author": "Josh Worden <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "yarn stop; docker-compose -p nativex up --quiet-pull", | ||
"stop": "docker-compose -p nativex down", | ||
"kill": "docker-compose -p nativex down; docker volume rm $(docker volume ls -q | grep nativex)" | ||
} | ||
} |