From 0978c6bebcd6db0242c54d2f769e45a01c732f51 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Wed, 14 Jun 2017 23:34:11 +0200 Subject: [PATCH] Package the build in a script and update image sizes in README. --- .travis.yml | 3 +-- Gruntfile.js | 15 ++++++++++----- README.md | 13 +++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index c26d76f1..c60b10a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,7 @@ addons: before_install: npm install -g npm@'>=2.13.5' script: -- grunt test -- grunt dist +- grunt build-dist - grunt docker-build - docker-compose build - docker-compose up -d diff --git a/Gruntfile.js b/Gruntfile.js index a4d08ccc..654f5f7c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,6 +31,10 @@ module.exports = function (grunt) { "apidoc": { cmd: "./node_modules/.bin/apidoc", args: ["-i", "src/server", "-o", "doc"] + }, + "make-dev-views": { + cmd: "sed", + args: ["-i", "s/authelia\.min/authelia/", `${buildDir}/src/server/views/layout/layout.pug`] } }, copy: { @@ -113,7 +117,7 @@ module.exports = function (grunt) { }, server: { files: ['src/server/**/*.ts', 'test/server/**/*.ts'], - tasks: ['build', 'run:docker-restart'], + tasks: ['build', 'run:docker-restart', 'run:make-dev-views' ], options: { interrupt: true, } @@ -141,11 +145,12 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-run'); - grunt.registerTask('default', ['build']); + grunt.registerTask('default', ['build-dist']); - grunt.registerTask('build-resources', ['copy:resources', 'copy:views', 'copy:images', 'copy:thirdparties', 'concat:css', 'cssmin']); - grunt.registerTask('build', ['run:tslint', 'run:build', 'browserify:dist']); - grunt.registerTask('dist', ['build', 'build-resources', 'run:minify', 'cssmin']); + grunt.registerTask('build-resources', ['copy:resources', 'copy:views', 'copy:images', 'copy:thirdparties', 'concat:css']); + + grunt.registerTask('build-dev', ['run:tslint', 'run:build', 'browserify:dist', 'build-resources', 'run:make-dev-views']); + grunt.registerTask('build-dist', ['build-dev', 'run:minify', 'cssmin']); grunt.registerTask('docker-build', ['run:docker-build']); grunt.registerTask('docker-restart', ['run:docker-restart']); diff --git a/README.md b/README.md index ab5aaeea..13f9969c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Add the following lines to your /etc/hosts to simulate multiple subdomains Then, type the following command to build and deploy the services: npm install --only=dev - grunt build + grunt build-dist docker-compose build docker-compose up -d @@ -58,7 +58,7 @@ After few seconds the services should be running and you should be able to visit Normally, a self-signed certificate exception should appear, it has to be accepted before getting to the login page: -![first-factor-page](https://raw.githubusercontent.com/clems4ever/authelia/master/images/first_factor.png) + ### 1st factor: LDAP and ACL An LDAP server has been deployed for you with the following credentials and @@ -79,7 +79,8 @@ any subdomain. Type them in the login page and validate. Then, the second factor page should have appeared as shown below. -![second-factor-page](https://raw.githubusercontent.com/clems4ever/authelia/master/images/second_factor.png) + + ### 2nd factor: TOTP (Time-Base One Time Password) @@ -92,7 +93,7 @@ your secret in QRCode and Base32 formats. You can use [Google Authenticator](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en) to store them and get the generated tokens required during authentication. -![totp-secret](https://raw.githubusercontent.com/clems4ever/authelia/master/images/totp.png) + ### 2nd factor: U2F (Universal 2-Factor) with security keys **Authelia** also offers authentication using U2F devices like [Yubikey](Yubikey) @@ -107,7 +108,7 @@ the link in your browser and you'll be asking to touch the token of your device to register it. You can now authenticate using your U2F device by simply touching the token. -![u2f-validation](https://raw.githubusercontent.com/clems4ever/authelia/master/images/u2f.png) + ### Password reset With **Authelia**, you can also reset your password in no time. Click on the @@ -117,7 +118,7 @@ email address. For the sake of the example, the email is delivered in the file ./notifications/notification.txt. Paste the link in your browser and you should be able to reset the password. -![reset-password](https://raw.githubusercontent.com/clems4ever/authelia/master/images/reset_password.png) + ### Access Control With **Authelia**, you can define your own access control rules for restricting