- Install sbt
- Install PostgreSQL and configure access for user
lama
and passwordserge
(default user and password fromsrc/main/resources/application.conf
) - Create database
lama
and give access to the configured user - Apply migration (see Database migration)
- Install RabbitMQ and configure access for user
lama
and passwordserge
(default user and password fromsrc/main/resources/application.conf
) - Install Redis with the default configuration
A shared
build.sbt
file is used at the root of the lama project to share common libraries and handle multiple sub projects.All following sbt commands should be done at the root path of the lama project.
Run the app: sbt accountManager/run
The project uses flywayt-sbt to migrate sql scripts in the folder src/main/resources/db/migration
.
Migrate your database using sbt accountManager/flywayMigrate
or clean it using sbt accountManager/flywayClean
.
sbt accountManager/test
- Create the
test-lama
database
psql -h localhost -p 15432 -U lama -c "CREATE DATABASE test-lama"
- Run tests
sbt accountManager/it:test
The plugin sbt-docker is used to build, run and publish the docker image.
The plugin provides these useful commands:
-
sbt accountManager/docker
: Builds an image. -
sbt accountManager/docker:stage
: Generates a directory with the Dockerfile and environment prepared for creating a Docker image. -
sbt accountManager/docker:publishLocal
: Builds an image using the local Docker server. -
sbt accountManager/docker:publish
Builds an image using the local Docker server, and pushes it to the configured remote repository. -
sbt accountManager/docker:clean
Removes the built image from the local Docker server.