-
Notifications
You must be signed in to change notification settings - Fork 7
Installation
Ahmet Ertuğrul Özcan edited this page Sep 6, 2021
·
3 revisions
- Install the latest .NET Core 3.1 SDK
- Install Git
- Clone this repo
- Install MongoDB
- Set database configuration
- Build solution in the root of the cloned repo
- Start ErtisAuth Server
- Migrate
- Enjoy with ErtisAuth
Make sure you have Docker installed.
If you have a mongo database, you just run ErtisAuth with docker image. Database configuration can be pass with environment variables on the docker run command.
From a terminal start ErtisAuth with the following command:
$ docker run -p 9716:80 ertugrulozcan/ertisauth:latest
For database configuration with environment variables;
$ docker run -p 9716:80 /
-e Database__Scheme=<DB_SCHEME> /
-e Database__Host=<DB_HOST> /
-e Database__Port=<DB_PORT> /
-e Database__Username=<DB_USERNAME> /
-e Database__Password=<DB_PASSWORD> /
-e Database__DefaultAuthDatabase=<DB_DATABASE> /
ertugrulozcan/ertisauth:latest
-
DB_SCHEME
: Specify name of the schema prefix string to use for DB that support schemas (optional, default is 'mongodb'). -
DB_HOST
: Specify hostname of the database (optional). ErtisAuth will append DB_PORT (if specify) to the hosts without port, otherwise it will append the default port 27017, again to the address without port only. -
DB_PORT
: Specify port of the database (optional, default is 27017) -
DB_USERNAME
: Specify user to use to authenticate to the database (optional, default is ``). -
DB_PASSWORD
: Specify user's password to use to authenticate to the database (optional, default is ``). -
DB_DATABASE
: Optional, default is 'ertisauth'. The authentication database to use if the connection string includes username:password@ authentication credentials but the authSource option is unspecified. If both authSource and defaultauthdb are unspecified, the client will attempt to authenticate the specified user to the admin database.
- Download docker-compose.yml file
- Run
docker-compose up -d
command on shell - ErtisAuth is now running on public port 9716
$ docker-compose up -d
This command will start ErtisAuth API exposed on the local port 9716 along with a composed MongoDB in same container. It will also create an membership (realm) an initial admin user and an application (optional) for machine to machine communication. If you wish, you can migrate whether membership, admin user, application etc resources later. For more information about the migration, look at the migration section in the documentation.