These instructions will get you a copy of the storage component up and running on your machine for development and testing purposes.
- .NET 8.0 SDK
- Newest Git
- A code editor - we like Visual Studio Code
- Also install recommended extensions (e.g. C#)
- Infrastructure
- Podman or another container tool such as Docker Desktop
- PostgreSQL
- pgAdmin
- Automatically setup using
docker compose up -d
Ensure that both PostgreSQL and pgAdmin have been installed and start pgAdmin.
If you installed prerequisite infrastructure through docker compose
, you can skip to the next section.
In pgAdmin
- Create database storagedb
- Create the following users with password: Password (see privileges in parentheses)
- platform_storage_admin (superuser, canlogin)
- platform_storage (canlogin)
- Create schema storage in storagedb with owner platform_storage_admin
A more detailed description of the database setup is available in our developer handbook
Clone Altinn Storage repo and navigate to the folder.
git clone https://github.com/Altinn/altinn-storage
cd altinn-storage
You can run the tests by executing
dotnet test Altinn.Platform.Storage.sln
-
Start Altinn Storage docker container run the command
podman compose up -d --build
-
To stop the container running Altinn Storage run the command
podman stop altinn-storage
The Storage components can be run locally when developing/debugging. Follow the install steps above if this has not already been done.
-
Navigate to src/Storage, and build and run the code from there, or run the solution using you selected code editor
cd src/Storage dotnet run
The storage solution is now available locally at http://localhost:5010/. To access swagger use http://localhost:5010/swagger.