This repository has been archived by the owner on Aug 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from nickdex/release/v0.3.1
v0.3.1
- Loading branch information
Showing
39 changed files
with
3,279 additions
and
2,778 deletions.
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,11 @@ | ||
.git | ||
.gitignore | ||
node_modules | ||
npm-debug.log | ||
dist | ||
app.log | ||
*.sh | ||
.vscode | ||
.github | ||
README.md | ||
LICENSE |
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 @@ | ||
<!-- Hello! If you're filing a bug, please include every step so as to help us reproduce it | ||
on our machines. If you're unsure about how to file an issue, use the issue template. If | ||
you need any help regarding usage of AIDA-Server, check out the documentation or hit us up | ||
on chat. | ||
You can ignore or delete this text, it is commented and won't appear when the issue is submitted or previewed. | ||
|
||
|
||
Chat: t.me/nickdex | ||
Issue Template: https://github.com/nickdex/AIDA-Server/.github/blob/master/ISSUE_TEMPLATE | ||
Documentation: https://github.com/nickdex/AIDA-Server/blob/master/README.md | ||
--> |
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,24 @@ | ||
<!-- | ||
Thanks for your contribution! | ||
|
||
Please take a quick look at those things down there. They're quite important. | ||
Really! We wrote them for you. Yes you! With utmost care. Read them. | ||
--> | ||
|
||
**For short term contributors:** We understand that getting your commits well | ||
defined like we require is a hard task and takes some learning. If you | ||
look to help without wanting to contribute long term there's no need | ||
for you to learn this. Just drop us a message and we'll take care of brushing | ||
up your stuff for merge! | ||
|
||
### Checklist | ||
|
||
- [ ] I read the | ||
[guidelines](https://github.com/nickdex/AIDA-Server/blob/master/README.md#contributing) and | ||
I've followed them. | ||
|
||
- [ ] I ran `yarn-lint` and it produced no errors. | ||
|
||
- [ ] I ran `yarn-build` and it produced no errors. | ||
|
||
|
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
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
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,7 +1,7 @@ | ||
{ | ||
"cSpell.words": [ | ||
"autoload", | ||
"cloudmqtt", | ||
"mqtt", | ||
"feathersjs", | ||
"gcmapi", | ||
"nedbdevice", | ||
|
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,16 @@ | ||
FROM node | ||
|
||
WORKDIR /app | ||
|
||
# Copy cache contents (if any) from local machine | ||
ADD .yarn-cache.tgz package.json yarn.lock / | ||
|
||
# Install packages | ||
# Container Specific node packages at root (for remote debug) | ||
RUN cd / && yarn && ln -s /node_modules /app/node_modules | ||
|
||
ADD . /app | ||
|
||
EXPOSE 80 | ||
|
||
CMD [ "yarn", "start" ] |
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,18 @@ | ||
FROM arm32v7/node | ||
|
||
COPY ./qemu-arm-static /usr/bin/qemu-arm-static | ||
|
||
WORKDIR /app | ||
|
||
# Copy cache contents (if any) from local machine | ||
ADD .yarn-cache.tgz package.json yarn.lock / | ||
|
||
# Install packages | ||
# Container Specific node packages at root (for remote debug) | ||
RUN cd / && yarn && ln -s /node_modules /app/node_modules | ||
|
||
ADD . /app | ||
|
||
EXPOSE 80 | ||
|
||
CMD [ "yarn", "start" ] |
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,27 @@ | ||
#!/bin/bash | ||
|
||
BUILD_MACHINE=$1 | ||
IMAGE_TAG="aida-server" | ||
DOCKERFILE="Dockerfile" | ||
|
||
# Init empty cache file | ||
if [ ! -f .yarn-cache.tgz ]; then | ||
echo "Init empty .yarn-cache.tgz" | ||
tar cvzf .yarn-cache.tgz --files-from /dev/null | ||
fi | ||
|
||
if [ "$BUILD_MACHINE" == 'rpi' ]; then | ||
IMAGE_TAG="$IMAGE_TAG-rpi" | ||
DOCKERFILE="Rpi.Dockerfile" | ||
echo "Rpi detected. Tag name - $IMAGE_TAG and Dockerfile - $DOCKERFILE" | ||
fi | ||
|
||
docker build -t nickdex/$IMAGE_TAG -f $DOCKERFILE . | ||
|
||
docker run --rm --entrypoint cat nickdex/$IMAGE_TAG:latest /yarn.lock > /tmp/yarn.lock | ||
if ! diff -q yarn.lock /tmp/yarn.lock > /dev/null 2>&1; then | ||
echo "Saving Yarn cache" | ||
docker run --rm --entrypoint tar nickdex/$IMAGE_TAG:latest czf - /usr/local/share/.cache/yarn/v4/ > .yarn-cache.tgz | ||
echo "Saving yarn.lock" | ||
cp /tmp/yarn.lock yarn.lock | ||
fi |
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 @@ | ||
docker run -d --name server --network aidanetwork -p 3000:3000 -p 5858:5858 -v `pwd`:/app nickdex/aida-server yarn dev |
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 @@ | ||
version: '2' | ||
|
||
services: | ||
aida-server: | ||
build: . | ||
command: /node_modules/ts-node-dev/bin/ts-node-dev --inspect=0.0.0.0:5858 ./src/server.ts | ||
volumes: | ||
- .:/app | ||
ports: | ||
- '3000:3000' | ||
- '5858:5858' |
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,76 +1,66 @@ | ||
{ | ||
"name": "aida-server", | ||
"version": "2.0.3", | ||
"version": "0.3.1", | ||
"private": true, | ||
"description": "Server to control all requests directed to my IoT devices in home", | ||
"main": "./dist/server.js", | ||
"author": "Nikhil Warke", | ||
"main": "src/server.ts", | ||
"author": "Nikhil Warke <[email protected]>", | ||
"license": "MIT", | ||
"repository": "https://github.com/nickdex/AIDA-Server.git", | ||
"bugs": { | ||
"url": "https://github.com/nickdex/AIDA-Server/issues" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
"scripts": { | ||
"start": "node dist/server.js", | ||
"start": "ts-node src/server.ts", | ||
"build": "tsc -p tsconfig.release.json", | ||
"dev": "yarn run build && node dist/server.js", | ||
"local": "yarn run build && yarn run serve", | ||
"serve": "forever start dist/server.js ", | ||
"stop": "forever stop dist/server.js", | ||
"clean": "rimraf coverage dist tmp", | ||
"watch": "tsc -w -p tsconfig.release.json", | ||
"dev": "ts-node-dev --inspect=0.0.0.0:5858 ./src/server.ts", | ||
"lint": "tslint -t stylish --project \"tsconfig.json\"", | ||
"pretest": "yarn run lint", | ||
"postinstall": "npm run build", | ||
"test": "yarn run test-only", | ||
"pretest": "yarn lint", | ||
"test": "yarn test-only", | ||
"test-only": "jest --coverage", | ||
"test:watch": "jest --watch" | ||
}, | ||
"dependencies": { | ||
"@feathersjs/express": "^1.2.0", | ||
"@feathersjs/feathers": "^3.1.7", | ||
"axios": "^0.18.0", | ||
"body-parser": "^1.18.2", | ||
"cors": "^2.8.4", | ||
"dotenv": "^6.0.0", | ||
"express": "^4.16.2", | ||
"feathers-nedb": "^3.0.0", | ||
"lodash": "^4.17.4", | ||
"morgan": "^1.9.0", | ||
"mqtt": "^2.18.1", | ||
"nedb": "^1.8.0", | ||
"pug": "^2.0.0-rc.4", | ||
"@feathersjs/express": "^1.3.1", | ||
"@feathersjs/feathers": "^3.3.1", | ||
"cors": "^2.8.5", | ||
"dotenv": "^6.2.0", | ||
"feathers-pouchdb": "alukito/feathers-pouchdb", | ||
"lodash": "^4.17.11", | ||
"morgan": "^1.9.1", | ||
"mqtt": "^2.18.8", | ||
"pouchdb-adapter-http": "^7.0.0", | ||
"pouchdb-core": "^7.0.0", | ||
"pouchdb-find": "^7.0.0", | ||
"triple-beam": "^1.3.0", | ||
"tslib": "~1.9.3", | ||
"typescript": "^2.9.2", | ||
"web-push": "^3.3.2", | ||
"winston": "^3.0.0" | ||
"typescript": "^3.3.3", | ||
"web-push": "^3.3.3", | ||
"winston": "^3.2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/body-parser": "^1.16.8", | ||
"@types/body-parser": "^1.17.0", | ||
"@types/cors": "^2.8.4", | ||
"@types/dotenv": "^4.0.2", | ||
"@types/express": "^4.0.35", | ||
"@types/feathersjs__express": "^1.1.2", | ||
"@types/feathersjs__feathers": "^3.0.0", | ||
"@types/jest": "^23.1.1", | ||
"@types/lodash": "^4.14.110", | ||
"@types/dotenv": "^6.1.0", | ||
"@types/feathersjs__express": "^1.1.4", | ||
"@types/feathersjs__feathers": "^3.1.1", | ||
"@types/jest": "^24.0.0", | ||
"@types/lodash": "^4.14.120", | ||
"@types/morgan": "^1.7.35", | ||
"@types/nedb": "^1.8.5", | ||
"@types/node": "^10.3.5", | ||
"@types/shelljs": "^0.8.0", | ||
"@types/node": "^10.12.24", | ||
"@types/pouchdb": "^6.3.2", | ||
"@types/pouchdb-adapter-http": "^6.1.2", | ||
"@types/pouchdb-core": "^7.0.1", | ||
"@types/pouchdb-find": "^6.3.3", | ||
"@types/triple-beam": "^1.3.0", | ||
"concurrently": "^3.6.0", | ||
"forever": "^0.15.3", | ||
"jest": "^23.1.0", | ||
"nodemon": "^1.13.0", | ||
"shelljs": "^0.8.1", | ||
"ts-jest": "^22.0.1", | ||
"ts-node": "^7.0.0", | ||
"tslint": "^5.8.0", | ||
"tslint-microsoft-contrib": "~5.0.2", | ||
"tsutils": "^2.21.0" | ||
"jest": "^24.1.0", | ||
"ts-jest": "^23.10.5", | ||
"ts-node": "^8.0.2", | ||
"ts-node-dev": "^1.0.0-pre.32", | ||
"tslint": "^5.12.1", | ||
"tslint-microsoft-contrib": "~6.0.0" | ||
} | ||
} |
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 @@ | ||
docker run -d --name=server --net=aidanet --restart=always --env PORT=80 --env MQTT_URL='http://mqtt:1883' --env DATABASE_URL='http://database' --env CORS_CLIENT_WHITELIST_URLS='["http://dashboard", "http://192.168.0.100"]' nickdex/aida-server |
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
Oops, something went wrong.