https://github.com/altinn/altinn-storage
Altinn platform microservice for handling instance storage
https://github.com/altinn/altinn-storage
Last synced: 5 months ago
JSON representation
Altinn platform microservice for handling instance storage
- Host: GitHub
- URL: https://github.com/altinn/altinn-storage
- Owner: Altinn
- Created: 2022-02-21T21:17:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-03T19:32:49.000Z (5 months ago)
- Last Synced: 2026-02-04T00:36:36.088Z (5 months ago)
- Language: C#
- Size: 4.17 MB
- Stars: 3
- Watchers: 20
- Forks: 6
- Open Issues: 49
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Altinn Storage
## Build status
[](https://dev.azure.com/brreg/altinn-studio/_build/latest?definitionId=30)
## Getting Started
These instructions will get you a copy of the storage component up and running on your machine for development and testing purposes.
### Prerequisites
- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
- Newest [Git](https://git-scm.com/downloads)
- A code editor - we like [Visual Studio Code](https://code.visualstudio.com/download)
- Also install [recommended extensions](https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions) (e.g. [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp))
- Infrastructure
- [Podman](https://podman.io/) or another container tool such as Docker Desktop
- [PostgreSQL](https://www.postgresql.org/download/)
- [pgAdmin](https://www.pgadmin.org/download/)
- Automatically setup using `docker compose up -d`
### Manually setting up PostgreSQL
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](https://docs.altinn.studio/en/community/contributing/handbook/postgres/)
### Setting up PostgreSQL with docker compose
Comment out the marked lines in Dockerfile and docker-compose.yml and run the services in docker-compose.
### Cloning the application
Clone [Altinn Storage repo](https://github.com/Altinn/altinn-storage) and navigate to the folder.
```bash
git clone https://github.com/Altinn/altinn-storage
cd altinn-storage
```
### Run tests
You can run the tests by executing
```bash
dotnet test Altinn.Platform.Storage.slnx
```
### Running the application in a docker container
- Start Altinn Storage docker container run the command
```cmd
podman compose up -d --build
```
- To stop the container running Altinn Storage run the command
```cmd
podman stop altinn-storage
```
### Running the application with .NET
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
```cmd
cd src/Storage
dotnet run
```
The storage solution is now available locally at http://localhost:5010/.
To access swagger use http://localhost:5010/swagger.
## Git blame
This repo has had a few commits that changes lots of files in insignificant ways (csharpier and file-scoped namespaces), that changed a lot of lines so if you keep seeing the same huge commit in git blame, we recommend the following command in the root of the repo.
```bash
git config blame.ignoreRevsFile .git-blame-ignore-revs
```