diff --git a/.babelrc b/.babelrc index 09acf26..4f2e582 100644 --- a/.babelrc +++ b/.babelrc @@ -1,11 +1,15 @@ { "presets": [ [ - "@babel/preset-env", { - "useBuiltIns": "usage" + "@babel/preset-env", + { + "useBuiltIns": "usage", + "corejs": 2 } ], "@babel/preset-react" ], - "plugins": ["@babel/plugin-proposal-object-rest-spread"], + "plugins": [ + "@babel/plugin-proposal-object-rest-spread" + ] } diff --git a/.ebextensions/01_node_bin.config b/.ebextensions/01_node_bin.config new file mode 100644 index 0000000..1e44911 --- /dev/null +++ b/.ebextensions/01_node_bin.config @@ -0,0 +1,5 @@ +container_commands: + 01_node_binary: + command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node" + 02_npm_binary: + command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/npm /bin/npm" diff --git a/.ebextensions/02_nodecommand.config b/.ebextensions/02_nodecommand.config new file mode 100644 index 0000000..ff3bb99 --- /dev/null +++ b/.ebextensions/02_nodecommand.config @@ -0,0 +1,4 @@ +# 02_nodecommand.config +# option_settings: +# aws:elasticbeanstalk:container:nodejs: +# NodeCommand: npm run start:eb diff --git a/.gitignore b/.gitignore index ed072b6..9f1cbe5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,9 @@ lib-cov *.out *.pid package-lock.json + +# Elastic Beanstalk Files +.elasticbeanstalk/* +!.elasticbeanstalk/*.cfg.yml +!.elasticbeanstalk/*.global.yml +.ebextensions/01_envvar.config diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..f380845 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +# Force npm to run node-gyp also as root, preventing permission denied errors in AWS with npm@5 +unsafe-perm=true \ No newline at end of file diff --git a/config/env/production.js b/config/env/production.js index a70e4aa..18f6c02 100644 --- a/config/env/production.js +++ b/config/env/production.js @@ -318,7 +318,7 @@ module.exports = { * this, just try deploying without setting it and see if it works.) * * * ***************************************************************************/ - port: 80, + port: 8081, /************************************************************************** * * diff --git a/package.json b/package.json index 8e33ae8..795762c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "roe-base", "private": true, - "version": "0.0.0", + "version": "0.0.1", "description": "a Sails application", "keywords": [], "scripts": { @@ -10,6 +10,7 @@ "start:debug": "npm-run-all --parallel open:client debug", "start:prod": "npm-run-all --parallel build:prod lift", "start:client": "webpack-dev-server --mode development", + "start:eb": "npm run db:migrate && npm run build:prod && npm run lift", "lift": "sails lift", "build": "npm run build:prod", "build:dev": "webpack --mode development", @@ -54,9 +55,9 @@ "sails-postgresql": "^1.0.2", "showdown": "^1.9.0", "ta-json-x": "^2.5.0", - "xmldom": "^0.1.27" - }, - "devDependencies": { + "webpack": "^4.23.1", + "webpack-cli": "^3.1.2", + "xmldom": "^0.1.27", "@babel/core": "^7.1.2", "@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/polyfill": "^7.0.0", @@ -76,14 +77,12 @@ "sass-loader": "^7.1.0", "standard": "^12.0.1", "style-loader": "^0.23.1", - "webpack": "^4.23.1", - "webpack-cli": "^3.1.2", "webpack-dev-server": "^3.1.10" }, "main": "app.js", "repository": { "type": "git", - "url": "git://github.com/vagrant/roe-base.git" + "url": "git://github.com/ebookfoundation/riverofebooks.git" }, "author": "vagrant", "license": "",