Storage Types is a Blazor Server application that demonstrates different types of data storage, including structured, semi-structured, and unstructured data. It uses SQLite for structured data and JSON for unstructured data.
- Displays structured data from an SQLite database.
- Renders unstructured data (images) from a JSON file.
- Built with Blazor Server and Dockerized for easy deployment.
- Download Docker.
- Run the container
docker-compose up -d
.
This will pull the container image from the GitHub Docker Registry.
To manually start the application using Docker, follow these steps:
-
Build the Docker image:
docker build -t storage-demo .
-
Run the Docker container:
docker run -d -p 8080:80 --name storage-demo storage-demo
-
Access the application in your browser at http://localhost:8080
After making changes to the project, the Docker container can be built and published to the Github Container Registry using the following steps.
docker login --username <USERNAME> --password <YOUR_PERSONAL_ACCESS_TOKEN> ghcr.io
docker build -t ghcr.io/primaryobjects/storage-demo:latest .
docker push ghcr.io/primaryobjects/storage-demo:latest
The Docker image can be launched using the following command to read docker-compose.yml
.
docker-compose up -d
Alternatively, manually launch the container.
docker run --name storage-demo-container -d -p 8080:80 ghcr.io/primaryobjects/storage-demo:latest
StorageDemo/
├── Components/
│ ├── Data/ # Contains database.json and database.sqlite
│ ├── Layout/ # Contains layout components like NavMenu
│ ├── Pages/ # Contains Blazor pages like Home, Structured_Data, and Unstructured_Data
├── Services/ # Contains services like StructuredDataService
├── wwwroot/ # Static files (e.g., images, CSS, JS)
├── Dockerfile # Dockerfile for building and running the app
├── [docker-compose.yml](http://_vscodecontentref_/1) # Docker Compose configuration (optional)
└── [readme.md](http://_vscodecontentref_/2) # Project documentation
- .NET SDK 9.0
- Docker
MIT
Kory Becker https://primaryobjects.com