An "authentique" authentication service, developed with express.js framework, powered by MongoDB
8.8K
This is a RESTful Authentication Service written in Node.js on express.js framework powered by MongoDB. It is intended that the developer use this as a module (microservice) in a project; rather than a standalone service since it is only a mean of authentication. That being said, if you plan to develop a service that includes authentication, it might be a good idea to have a head start and build on top of this project instead of starting one from scratch.
API Reference is provided in the wiki pages.
| :information_source: | A set of environment variables have been introduced to control some configuration and parameters in the application. Feel free to explore them in the .env and docker-compose.yml files. Note that environment variables take precedence over config parameters in config/config.js file. Also, note that you only need to modify the .env file for the cases of docker-compose and docker stack deploy (no need to change the docker-compose.yml file) |
| :warning: | Authentiq provides JWT for authentication and session management. Currently, we do not generate unique key pairs for each new environment (this feature will be available soon). If you'd like to deploy this project in a production environment, it is very important to generate your own public / private key pair. The generated key pair should be placed in keys directory with the names public.key and private.key. |
In order to run this as a service and probably develop on top of it, you'll need to do the followings:
cd to the cloned repository.config/config.json).npm install.npm run dev or nodemon.NODE_ENV to production and run npm start (alternatively, you may use docker-compose; explained later on)| :triangular_flag_on_post: | Running npm start will only run your application; it will not relaunch it in the case that it crashes. To do that, you may use PM2 or Forever or any other package that provides this feature, in order to sustain availability. |
If you want to run the module as a containerize microservice, you'll need to do the followings:
x86_64, arm32v6, arm32v7, arm64v8 (aka aarch64) on alpine. Images are available on DockerHub repository and can be pulled with sayid/authentiq. They are tested on normal x86_64 machines as well as RaspberryPi zero w, RaspberryPi 2B, RaspberryPi 3B, RaspberryPi 4B and the ASUS Tinkerboard.cd to the cloned repository. Then run docker build -t $DOCKER_ACC/$DOCKER_REPO:$IMG_TAG . to build the image locally. Another option is to fork the repo and enable autobuild on DockerHub.alpine-1 tag, which is currently the same as latest) to keep consistency.authentiq-db. This is the name that should be resolved to the IP address of the MongoDB container. If you'd like to change that, you'll need to modify the proper environment variables.docker-compose.yml file that includes everything needed to launch the system. You may use either of docker-compose or docker stack deploy to setup the system for production easily! Override the default parameters by setting environment variables in the .env file.| :information_source: | The Super Admin user of the system is created after the application is started with the following credentials ([email protected]:admin1234). Override it by setting proper environment variables. Note that the Super Admin user is verified by default! |
Developed by S. Saeed Hosseini and Mohammad Moradi, released under MIT License.
Content type
Image
Digest
Size
48.7 MB
Last updated
over 6 years ago
docker pull sayid/authentiq