mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
backend: Moving backend into frontend
This commit is contained in:
parent
07e85be03b
commit
76dd5b8634
@ -1,4 +0,0 @@
|
|||||||
/node_modules
|
|
||||||
coverage
|
|
||||||
.nyc_output
|
|
||||||
static
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "semistandard",
|
|
||||||
"rules": {
|
|
||||||
"space-before-function-paren": [2, "never"],
|
|
||||||
"object-curly-newline": ["error", {
|
|
||||||
"minProperties": 1
|
|
||||||
}],
|
|
||||||
"sort-vars": ["error", {
|
|
||||||
"ignoreCase": true
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"libs": [
|
|
||||||
"ecmascript"
|
|
||||||
],
|
|
||||||
"plugins": {
|
|
||||||
"doc_comment": true,
|
|
||||||
"local-scope": true,
|
|
||||||
"node": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
FRONTEND = "../frontend"
|
|
||||||
|
|
||||||
.PHONY: install
|
|
||||||
install:
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
.PHONY: install-production
|
|
||||||
install-production:
|
|
||||||
yarn install --production --pure-lockfile
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
@rm -rf node_modules
|
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
test:
|
|
||||||
@echo "No tests for backend"
|
|
||||||
|
|
||||||
.PHONY: app-install
|
|
||||||
app-install:
|
|
||||||
$(MAKE) -C $(FRONTEND) copy
|
|
||||||
|
|
||||||
install: app-install
|
|
||||||
|
|
||||||
.PHONY: start
|
|
||||||
start:
|
|
||||||
npm run start
|
|
@ -1,13 +0,0 @@
|
|||||||
# Joyent Dashboard Backend
|
|
||||||
|
|
||||||
## start
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|
||||||
## test
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run test
|
|
||||||
```
|
|
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "joyent-dashboard-backend",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"private": true,
|
|
||||||
"license": "private",
|
|
||||||
"main": "src/index.js",
|
|
||||||
"scripts": {
|
|
||||||
"start": "node .",
|
|
||||||
"lint": "eslint .",
|
|
||||||
"open": "nyc report --reporter=html & open coverage/index.html",
|
|
||||||
"coverage": "nyc check-coverage --statements 100 --functions 100 --lines 100 --branches 100"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"express": "^4.14.0",
|
|
||||||
"locale": "^0.1.0",
|
|
||||||
"lodash.template": "^4.4.0",
|
|
||||||
"lodash.uniq": "^4.5.0",
|
|
||||||
"st": "^1.2.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"eslint": "^3.8.1",
|
|
||||||
"eslint-config-semistandard": "^7.0.0",
|
|
||||||
"eslint-config-standard": "^6.2.0",
|
|
||||||
"eslint-plugin-promise": "^3.3.0",
|
|
||||||
"eslint-plugin-standard": "^2.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
2
backend/static/.gitignore
vendored
2
backend/static/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
*
|
|
||||||
!.gitignore
|
|
1054
backend/yarn.lock
1054
backend/yarn.lock
File diff suppressed because it is too large
Load Diff
@ -34,11 +34,11 @@ cloudapi:
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Frontend
|
# Frontend
|
||||||
#############################################################################
|
#############################################################################
|
||||||
backend:
|
frontend:
|
||||||
image: quay.io/yldio/joyent-dashboard-backend
|
image: quay.io/yldio/joyent-dashboard-frontend
|
||||||
mem_limit: 128m
|
mem_limit: 128m
|
||||||
labels:
|
labels:
|
||||||
- triton.cns.services=backend
|
- triton.cns.services=frontend
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
- PORT=8000
|
- PORT=8000
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
BACKEND = "../backend/static"
|
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
.PHONY: install-production
|
.PHONY: install-production
|
||||||
install-production:
|
install-production: compile clean
|
||||||
yarn install --production --pure-lockfile
|
yarn install --production --pure-lockfile
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
@ -20,8 +18,6 @@ test:
|
|||||||
compile: install
|
compile: install
|
||||||
NODE_ENV=production ./node_modules/.bin/webpack --config webpack/index.js
|
NODE_ENV=production ./node_modules/.bin/webpack --config webpack/index.js
|
||||||
|
|
||||||
# I'm not sure this is the best idea, let's see how this works out for us
|
.PHONY: start
|
||||||
# and then go with something better once we find pain points
|
start:
|
||||||
.PHONY: copy
|
npm run production
|
||||||
copy: compile
|
|
||||||
@cp -r static/* $(BACKEND)
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --open --config webpack/index.js",
|
"start": "webpack-dev-server --open --config webpack/index.js",
|
||||||
|
"production": "node server",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test": "BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(pwd)/webpack/index.js nyc ava test/*.js --verbose",
|
"test": "BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(pwd)/webpack/index.js nyc ava test/*.js --verbose",
|
||||||
"open": "nyc report --reporter=html & open coverage/index.html",
|
"open": "nyc report --reporter=html & open coverage/index.html",
|
||||||
@ -18,6 +19,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"constant-case": "^2.0.0",
|
"constant-case": "^2.0.0",
|
||||||
|
"express": "^4.14.0",
|
||||||
|
"locale": "^0.1.0",
|
||||||
|
"lodash.template": "^4.4.0",
|
||||||
|
"lodash.uniq": "^4.5.0",
|
||||||
"querystring": "^0.2.0",
|
"querystring": "^0.2.0",
|
||||||
"react": "^15.3.2",
|
"react": "^15.3.2",
|
||||||
"react-dom": "^15.3.2",
|
"react-dom": "^15.3.2",
|
||||||
@ -32,7 +37,8 @@
|
|||||||
"redux-batched-actions": "^0.1.3",
|
"redux-batched-actions": "^0.1.3",
|
||||||
"redux-logger": "^2.7.0",
|
"redux-logger": "^2.7.0",
|
||||||
"redux-promise-middleware": "^4.1.0",
|
"redux-promise-middleware": "^4.1.0",
|
||||||
"redux-thunk": "^2.1.0"
|
"redux-thunk": "^2.1.0",
|
||||||
|
"st": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^0.16.0",
|
"ava": "^0.16.0",
|
||||||
|
@ -188,6 +188,12 @@ assert@^1.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
util "0.10.3"
|
util "0.10.3"
|
||||||
|
|
||||||
|
async-cache@~1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/async-cache/-/async-cache-1.1.0.tgz#4a9a5a89d065ec5d8e5254bd9ee96ba76c532b5a"
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^4.0.0"
|
||||||
|
|
||||||
async-each@^1.0.0:
|
async-each@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
|
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
|
||||||
@ -2418,7 +2424,7 @@ expand-range@^1.8.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
fill-range "^2.1.0"
|
fill-range "^2.1.0"
|
||||||
|
|
||||||
express@^4.13.3:
|
express, express@^4.13.3:
|
||||||
version "4.14.0"
|
version "4.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.14.0.tgz#c1ee3f42cdc891fb3dc650a8922d51ec847d0d66"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.14.0.tgz#c1ee3f42cdc891fb3dc650a8922d51ec847d0d66"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -2509,6 +2515,10 @@ fbjs@^0.8.4:
|
|||||||
promise "^7.1.1"
|
promise "^7.1.1"
|
||||||
ua-parser-js "^0.7.9"
|
ua-parser-js "^0.7.9"
|
||||||
|
|
||||||
|
fd@~0.0.2:
|
||||||
|
version "0.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/fd/-/fd-0.0.2.tgz#e0edb2bd7a88cc86dd9f16391cba832418fd87ee"
|
||||||
|
|
||||||
figures@^1.3.5, figures@^1.4.0:
|
figures@^1.3.5, figures@^1.4.0:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
|
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
|
||||||
@ -2788,7 +2798,7 @@ got@^5.0.0:
|
|||||||
unzip-response "^1.0.0"
|
unzip-response "^1.0.0"
|
||||||
url-parse-lax "^1.0.0"
|
url-parse-lax "^1.0.0"
|
||||||
|
|
||||||
graceful-fs@^4.1.2, graceful-fs@^4.1.4:
|
graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@~4.1.4:
|
||||||
version "4.1.9"
|
version "4.1.9"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.9.tgz#baacba37d19d11f9d146d3578bc99958c3787e29"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.9.tgz#baacba37d19d11f9d146d3578bc99958c3787e29"
|
||||||
|
|
||||||
@ -3502,6 +3512,10 @@ loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0
|
|||||||
json5 "^0.5.0"
|
json5 "^0.5.0"
|
||||||
object-assign "^4.0.1"
|
object-assign "^4.0.1"
|
||||||
|
|
||||||
|
locale:
|
||||||
|
version "0.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/locale/-/locale-0.1.0.tgz#3b5bf70614fdab48ac3e3fbc648147cb65443bde"
|
||||||
|
|
||||||
lodash-es@^4.2.1:
|
lodash-es@^4.2.1:
|
||||||
version "4.16.4"
|
version "4.16.4"
|
||||||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.16.4.tgz#4dc3e2cf33a8c343028aa7f7e06d1c9697042599"
|
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.16.4.tgz#4dc3e2cf33a8c343028aa7f7e06d1c9697042599"
|
||||||
@ -3605,7 +3619,7 @@ lodash.some@^4.4.0:
|
|||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
|
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
|
||||||
|
|
||||||
lodash.template@^4.2.4:
|
lodash.template, lodash.template@^4.2.4:
|
||||||
version "4.4.0"
|
version "4.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
|
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -3618,7 +3632,7 @@ lodash.templatesettings@^4.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lodash._reinterpolate "~3.0.0"
|
lodash._reinterpolate "~3.0.0"
|
||||||
|
|
||||||
lodash.uniq@^4.3.0:
|
lodash.uniq, lodash.uniq@^4.3.0:
|
||||||
version "4.5.0"
|
version "4.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||||
|
|
||||||
@ -3773,7 +3787,7 @@ mime-types@^2.1.11, mime-types@~2.1.11, mime-types@~2.1.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
mime-db "~1.24.0"
|
mime-db "~1.24.0"
|
||||||
|
|
||||||
mime@^1.3.4, mime@1.3.4:
|
mime@^1.3.4, mime@~1.3.4, mime@1.3.4:
|
||||||
version "1.3.4"
|
version "1.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
|
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
|
||||||
|
|
||||||
@ -3840,7 +3854,7 @@ ncp@^2.0.0:
|
|||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
|
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
|
||||||
|
|
||||||
negotiator@0.6.1:
|
negotiator@~0.6.1, negotiator@0.6.1:
|
||||||
version "0.6.1"
|
version "0.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
|
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
|
||||||
|
|
||||||
@ -5605,6 +5619,18 @@ sshpk@^1.7.0:
|
|||||||
jsbn "~0.1.0"
|
jsbn "~0.1.0"
|
||||||
tweetnacl "~0.14.0"
|
tweetnacl "~0.14.0"
|
||||||
|
|
||||||
|
st:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/st/-/st-1.2.0.tgz#e6313c1836a0889e8507be5bb189b2245266c2df"
|
||||||
|
dependencies:
|
||||||
|
async-cache "~1.1.0"
|
||||||
|
bl "~1.1.2"
|
||||||
|
fd "~0.0.2"
|
||||||
|
mime "~1.3.4"
|
||||||
|
negotiator "~0.6.1"
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "~4.1.4"
|
||||||
|
|
||||||
stack-utils@^0.4.0:
|
stack-utils@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-0.4.0.tgz#940cb82fccfa84e8ff2f3fdf293fe78016beccd1"
|
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-0.4.0.tgz#940cb82fccfa84e8ff2f3fdf293fe78016beccd1"
|
||||||
|
@ -15,11 +15,11 @@ cloudapi:
|
|||||||
- PORT=3000
|
- PORT=3000
|
||||||
- ROOT_URL=http://localhost:3000
|
- ROOT_URL=http://localhost:3000
|
||||||
- CONSUL=consul
|
- CONSUL=consul
|
||||||
backend:
|
frontend:
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose.yml
|
file: docker-compose.yml
|
||||||
service: backend
|
service: frontend
|
||||||
build: ./backend
|
build: ./frontend
|
||||||
links:
|
links:
|
||||||
- consul:consul
|
- consul:consul
|
||||||
environment:
|
environment:
|
||||||
|
Loading…
Reference in New Issue
Block a user