-
You'll need Docker, Node, and Rust installed
-
Install SQLx:
cargo install sqlx-cli
- Set up a local postgres database for the idp service and run the Hydra instance (necessary each time the docker containers are shut down):
docker-compose up zagreus-postgres hydra
- You'll need to setup your database. Zagreus uses SQLx to handle database management, migrations, and queries.
sqlx database create
sqlx migrate run
- Build the app using Cargo (should be installed with Rust):
cargo build --release
Building in release mode might take some time, relax and grab some coffee 😁 Dev mode with cargo check
is much, much faster.
- If needed, add the built executable to your system's $PATH. Easiest way would be to symlink the built binary to one folder that is already in your path, e.g. /usr/local/bin/
echo $PATH
sudo ln -s /[full-path-to-the-project-folder]/zagreus-identity-provider/target/debug/zagreus /usr/local/bin/
-
Go to the client project and run the zagreus commands to initiate the idp database with a client and run the server.
-
Follow the client's instructions or create your own client (see here for more)
From that step it's up to the client to elaborate its own building process, but here are some things to know.
- The
zagreus
command is meant to be used as a standalone binary installed on a system or via Docker. It relies on environment variables that have to be present in a.env
file at the root of the client project. This way thezagreus
binary can load the required configuration and run properly. - In order to initialize your client you can run the following command (needed once):
zagreus init --client-name [my-client-name]
- Zagreus can be started using this command:
zagreus run
Or by prepending RUST_LOG=info
to the command above to display the logs in the terminal.
Documentation can be found here.