diff --git a/README.md b/README.md index 4897e47..24da904 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,6 @@ To be a bit more specific: 5. Lastly, you'll need a route somewhere to catch redirections and tokens from Accownt after each successful login. You set this already in your config. 6. Optionally, you can also add a link somewhere that takes _authenticated_ users to Accownt so they can modify their account information, like their password or 2FA. -## Docker - -Docker support is currently being added. You should use the Dockerfiles within the server and web directories to run containers using the .env files. See the docker-compose.yml for a (development environment) example. - # Screenshots Login screenshot diff --git a/package.json b/package.json index cf6a748..0b7a4c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "accownt", - "version": "6.0.0-alpha.2", + "version": "6.0.0-alpha.3", "description": "Dead simple user account system so easy a cow could do it.", "main": "index.js", "bin": { @@ -10,8 +10,8 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "accownt-server": "6.0.0-alpha.2", - "accownt-web": "6.0.0-alpha.2" + "accownt-server": "6.0.0-alpha.3", + "accownt-web": "6.0.0-alpha.3" }, "prettier": { "singleQuote": true diff --git a/server/app.ts b/server/app.ts index 59c8db5..5af23b5 100644 --- a/server/app.ts +++ b/server/app.ts @@ -1,5 +1,8 @@ import 'app-module-path/register'; +import { config } from 'dotenv'; +config(); import 'enve'; + import { verifyRequestJWT } from 'lib/jwt/verify'; import * as cookieParser from 'cookie-parser'; import * as bodyParser from 'body-parser'; diff --git a/server/package-lock.json b/server/package-lock.json index 5c31d54..c439718 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,6 +1,6 @@ { "name": "accownt-server", - "version": "6.0.0-alpha.2", + "version": "6.0.0-alpha.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -227,6 +227,15 @@ "@types/express": "*" } }, + "@types/dotenv": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/dotenv/-/dotenv-6.1.0.tgz", + "integrity": "sha512-gmbNb7V1LbJQA4MmH0hVFgqY1cyKsa6RvKC1Xrq0WBnZ0JuuvXKciXx/s8dN0LVXCJd8xO6wIaSFSyUIoGph9g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -1373,6 +1382,11 @@ "is-obj": "^1.0.0" } }, + "dotenv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", diff --git a/server/package.json b/server/package.json index 839350c..9d3bd27 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "accownt-server", - "version": "6.0.0-alpha.2", + "version": "6.0.0-alpha.3", "description": "Dead simple user account system so easy a cow could do it.", "main": "dist/app.js", "scripts": { @@ -24,6 +24,7 @@ "bcryptjs": "^2.4.3", "body-parser": "^1.18.3", "cookie-parser": "^1.4.3", + "dotenv": "^6.2.0", "enve": "^1.0.0", "express": "^4.16.4", "jsonwebtoken": "^8.4.0", @@ -35,6 +36,7 @@ "devDependencies": { "@types/bcryptjs": "^2.4.2", "@types/cookie-parser": "^1.4.1", + "@types/dotenv": "^6.1.0", "@types/jest": "^23.3.14", "@types/jsonwebtoken": "^8.3.0", "@types/node-persist": "0.0.33", diff --git a/server/tests.ts b/server/tests.ts index 440d597..6c06d35 100644 --- a/server/tests.ts +++ b/server/tests.ts @@ -1,4 +1,7 @@ +import { config } from 'dotenv'; +config(); import 'enve'; + import { finishPasswordlessLogin } from 'lib/login/passwordless/finish'; import { startPasswordlessLogin } from 'lib/login/passwordless/start'; import { finishRegistration } from 'lib/register/finish'; diff --git a/web/package-lock.json b/web/package-lock.json index 5139c3c..5a5727e 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "accownt-web", - "version": "6.0.0-alpha.2", + "version": "6.0.0-alpha.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -945,6 +945,15 @@ "react-is": "^16.6.3" } }, + "@types/dotenv": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/dotenv/-/dotenv-6.1.0.tgz", + "integrity": "sha512-gmbNb7V1LbJQA4MmH0hVFgqY1cyKsa6RvKC1Xrq0WBnZ0JuuvXKciXx/s8dN0LVXCJd8xO6wIaSFSyUIoGph9g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/jss": { "version": "9.5.7", "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.7.tgz", @@ -954,6 +963,12 @@ "indefinite-observable": "^1.0.1" } }, + "@types/node": { + "version": "11.9.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.5.tgz", + "integrity": "sha512-vVjM0SVzgaOUpflq4GYBvCpozes8OgIIS5gVXVka+OfK3hvnkC1i93U8WiY2OtNE4XUWyyy/86Kf6e0IHTQw1Q==", + "dev": true + }, "@types/prop-types": { "version": "15.5.8", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.5.8.tgz", @@ -2550,6 +2565,11 @@ "domelementtype": "1" } }, + "dotenv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" + }, "duplexify": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", diff --git a/web/package.json b/web/package.json index b51c504..52016f4 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "accownt-web", - "version": "6.0.0-alpha.2", + "version": "6.0.0-alpha.3", "description": "Dead simple user account system so easy a cow could do it.", "main": "", "scripts": { @@ -17,6 +17,7 @@ "dependencies": { "@material-ui/core": "^3.9.2", "axios": "^0.18.0", + "dotenv": "^6.2.0", "enve": "^1.0.0", "react": "^16.8.1", "react-dom": "^16.8.1", @@ -29,6 +30,7 @@ "@babel/preset-env": "^7.3.1", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.1.0", + "@types/dotenv": "^6.1.0", "@types/react": "^16.8.2", "@types/react-dom": "^16.8.0", "babel-loader": "^8.0.5", diff --git a/web/webpack.config.js b/web/webpack.config.js index 4cba721..cbdfad4 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -1,8 +1,10 @@ +require('dotenv').config(); +require('enve'); + const CompressionPlugin = require('compression-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const path = require('path'); -require('enve'); module.exports = { mode: process.enve.NODE_ENV,