Files
Hy2026/README.md
T
Rafał Tyński 5598fa5156 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.
2026-10-03 20:23:25 +02:00

1.9 KiB

TarninaHub

Wersja: 0.0.1

Platforma Małopolskiego Hubu Innowacji Społecznych (MVP hackathonu).

  • backend/ — aplikacja backendowa w C# (ASP.NET Core, TarninaHub).
  • client/ — aplikacja frontendowa Vue 3 + TypeScript (Vite).
  • scripts/ — skrypty budujące całość.
  • TarninaHub.slnx — solution .NET.
  • Dockerfile + docker-compose.yaml — uruchomienie kontenerowe.

Wymagania

  • .NET SDK 10+
  • Node.js 22+ (npm)

Praca lokalna

Backend (dev) nasłuchuje na https://localhost:7080.

# terminal 1 — backend
dotnet run --project backend

# terminal 2 — client (Vite, proxy /api -> http://localhost:5078)
npm --prefix client install
npm --prefix client run dev

Skrypty

npm --prefix client run dev      # uruchamia Vite (dev server)
npm --prefix client run build    # buduje aplikację Vite do client/dist
npm --prefix client run copy     # kopiuje client/dist -> backend/wwwroot
node scripts/build.mjs           # buduje całość (client + copy + backend)

Docker

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

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
├─ Dockerfile               # multi-stage: client + backend
├─ docker-compose.yaml      # uruchomienie (bind ./data)
├─ docker-compose.yaml.example
├─ TarninaHub.slnx
└─ README.md