- Run
docker-compose up --build
from your.sln
directory to spin up your database(s) and other supporting infrastructure depending on your configuration (e.g. RabbitMQ, Keycloak, Jaeger, etc.). - Setup the Keycloak auth server with Pulumi:
- Install the pulumi CLI
cd
to your scaffolded Pulumi project- Run
pulumi login --local
to use Pulumi locally - Run
pulumi up
to start the scaffolding processNote: The stack name must match the extension on your yaml config file (e.g.
Pulumi.dev.yaml
) would have a stack ofdev
. - Select yes to apply the configuration to your local Keycloak instance.
If you want to reset your pulumi configuration, run
pulumi destroy
to remove all the resources and thenpulumi up
again to start fresh.
- If running a BFF:
- Make sure you have
pnpm
installed - Run the project with
dotnet run
or your IDE
- Make sure you have
- If you want to use the corresponding UI, clone down the UI repo and follow the instructions in the README.
Once you have your database(s) running, you can run your API(s), BFF, and Auth Server by using
the dotnet run
command or running your projects from your IDE of choice.
Migrations should be applied for you automatically on startup, but if you have any any issues, you can do the following:
1. Make sure you have a migrations in your boundary project (there should be a Migrations
directory in the project directory).
If there isn't see Running Migrations below.
2. Confirm your environment (ASPNETCORE_ENVIRONMENT
) is set to Development
using
$Env:ASPNETCORE_ENVIRONMENT = "Development"
for powershell or export ASPNETCORE_ENVIRONMENT=Development
for bash.
3. cd
to the boundary project root (e.g. cd PeakLims/src/PeakLims
)
4. Run your project and your migrations should be applied automatically. Alternatively, you can run dotnet ef database update
to apply your migrations manually.
> You can also stay in the `sln` root and run something like `dotnet ef database update --project PeakLims/src/PeakLims`
To run integration tests:
- Ensure that you have docker installed.
- Go to your src directory for the bounded context that you want to test.
- Confirm that you have migrations in your infrastructure project. If you need to add them, see the instructions below.
- Run the tests
⏳ If you don't have the database image pulled down to your machine, they will take some time on the first run.