maif / izanami   1.11.5

Apache License 2.0 Website GitHub

Izanami is a centralized versatile feature flag solution, well suited for micro service architectures.

Scala versions: 2.13 2.12 2.11

Izanami

image

This README is for anyone who would like to contribute to Izanami.

If you're interested in Izanami documentation, it's here.

Start application locally

Izanami frontend

cd izanami-frontend
npm run dev

Local database & misc tools

docker-compose rm -f && docker-compose up

Izanami backend

sbt -jvm-debug 5005
~run -Dconfig.resource=dev.conf

Once everything is started, just browse to localhost:3000.

In a developement setup, it may be usefull to craft tokens with longer TTL

sbt -jvm-debug 5005
~run -Dconfig.resource=dev.conf -Dapp.sessions.TTL=604800

Backend tests

To run test, you can either start Izanami and associated tooling (db, ...) with above commands or just run a suite / a test.

In fact, an Izanami instance and docker containers will be started by tests if none is running. This could be usefull for coverage / debug.

You'll need docker-compose installed locally to run tests like this, due to this issue.

Colima setup

To run test without having starting docker-compose, you'll need these env variables to be set.

DOCKER_HOST=unix://${HOME}/.colima/default/docker.sock;
RYUK_CONTAINER_PRIVILEGED=true;
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock

Package application

To package frontend :

cd izanami-frontend
npm run build

To package backend (make sure to package frontend first) :

sbt "set test in assembly := {}" clean assembly

To start generated jar

java -Dconfig.resource=dev.conf -jar ./target/scala-2.13/izanami.jar

To build docker image (after packaging frontend and backends)

docker build -t izanami .

To test docker image

docker run --env IZANAMI_PG_URI=postgresql://postgres:[email protected]:5432/postgres -p 9000:9000 izanami