build(docker): add container setup with persistent ./data volume

Add a multi-stage Dockerfile (Vue build + .NET 10 publish) and a docker-compose service exposing port 8080 with a single bind mount ./data -> /app/data for SurrealDB persistence. Include an example compose file, a .dockerignore, and document Docker usage and version 0.0.1 in the README.
This commit is contained in:
Rafał Tyński
2026-10-03 20:23:25 +02:00
parent 3b94358162
commit 5598fa5156
6 changed files with 185 additions and 5 deletions
+26 -5
View File
@@ -1,11 +1,14 @@
# hubmi
# TarninaHub
**Wersja: 0.0.1**
Platforma Małopolskiego Hubu Innowacji Społecznych (MVP hackathonu).
- **backend/** — aplikacja backendowa w C# (ASP.NET Core, `HubMi.Api`).
- **backend/** — aplikacja backendowa w C# (ASP.NET Core, `TarninaHub`).
- **client/** — aplikacja frontendowa Vue 3 + TypeScript (Vite).
- **scripts/** — skrypty budujące całość.
- `HubMi.slnx` — solution .NET.
- `TarninaHub.slnx` — solution .NET.
- `Dockerfile` + `docker-compose.yaml` — uruchomienie kontenerowe.
## Wymagania
@@ -34,15 +37,33 @@ npm --prefix client run copy # kopiuje client/dist -> backend/wwwroot
node scripts/build.mjs # buduje całość (client + copy + backend)
```
## Docker
```pwsh
cp docker-compose.yaml.example docker-compose.yaml
docker compose up --build
```
- Aplikacja: http://localhost:8080
- Dane: `./data` (bind mount, trwałe — SurrealDB embedded RocksDB)
- Obraz: `tarninahub:0.0.1`
Wolumen hosta można wskazać zmienną `TARNINAHUB_PORT` (domyślnie `8080`).
Plik `docker-compose.yaml.example` jest szablonem; `docker-compose.yaml` możesz
dostosować lokalnie.
## Struktura
```
hubmi/
TarninaHub/
├─ backend/ # ASP.NET Core Web API + wwwroot (build z client)
├─ client/ # Vue 3 + TS + Vite
├─ scripts/
│ ├─ build.mjs # build całości
│ └─ copy-client.mjs # client/dist -> backend/wwwroot
├─ HubMi.slnx
├─ Dockerfile # multi-stage: client + backend
├─ docker-compose.yaml # uruchomienie (bind ./data)
├─ docker-compose.yaml.example
├─ TarninaHub.slnx
└─ README.md
```