graphiql-online upgrade deployment to now 2.0 (close #1838) (#1858)

This commit is contained in:
Praveen Durairaj 2019-03-27 13:56:04 +05:30 committed by Shahidh K Muhammed
parent ada35c2236
commit b3bf0b029d
4 changed files with 599 additions and 321 deletions

View File

@ -19,4 +19,4 @@ RUN npm run build
RUN rm -Rf node_modules
EXPOSE 8080
# serve dist folder on port 8080
CMD ["serve", "-s", "static", "-p", "8080"]
CMD ["serve", "-s", "static", "-p", "8080"]

View File

@ -1,4 +1,25 @@
{
"name": "graphqurl-graphiql",
"alias": "hasura-graphiql.now.sh"
}
"version": 2,
"name": "graphiql-online",
"alias": ["graphiql-online.com"],
"builds": [
{
"src": "package.json",
"use": "@now/static-build",
"config": { "distDir": "static" }
}
],
"routes": [
{
"src": "/static/(.*)",
"headers": { "cache-control": "s-maxage=31536000,immutable" },
"dest": "/static/$1"
},
{ "src": "/favicon.ico", "dest": "/favicon.ico" },
{
"src": "/(.*)",
"headers": { "cache-control": "s-maxage=0" },
"dest": "/static/index.html"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"start": "concurrently --kill-others \"npm run start-prod\"",
"start-prod": "better-npm-run start-prod",
"build": "webpack --progress -p --colors --display-error-details --config webpack/prod.config.js",
"now-build": "webpack --progress -p --colors --display-error-details --config webpack/prod.config.js",
"build-unused": "webpack --verbose --colors --display-error-details --config webpack/prod.config.js --json | webpack-unused -s src",
"lint": "eslint -c .eslintrc src api",
"start-dev": "better-npm-run start-dev",
@ -20,7 +21,7 @@
"dev": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev\" ",
"cypress": "cypress open",
"test": "cypress run --spec 'cypress/integration/test_complete.js' --config baseUrl=$CYPRESS_BASE_URL",
"deploy": "now --docker --public && now alias && now alias hasura-graphiql.now.sh graphiql-online.com"
"deploy": "now"
},
"betterScripts": {
"start-prod": {
@ -45,7 +46,7 @@
"deep-equal": "^1.0.1",
"graphiql": "^0.11.11",
"graphiql-explorer-hasura": "0.0.7",
"graphql": "^0.13.2",
"graphql": "^14.0.2",
"hasura-console-graphiql": "0.0.10",
"history": "^3.0.0",
"hoist-non-react-statics": "^1.0.3",