Files
Hy2026/docker-compose.yaml
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

32 lines
843 B
YAML

name: tarninahub
services:
app:
image: tarninahub:0.0.1
build:
context: .
dockerfile: Dockerfile
args:
APP_VERSION: 0.0.1
container_name: tarninahub
restart: unless-stopped
# RocksDB zapisuje do bind-mountu ./data; root upraszcza uprawnienia (MVP).
user: "0:0"
ports:
- "${TARNINAHUB_PORT:-8080}:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:8080
SurrealDb__Namespace: hubmi
SurrealDb__Database: hubmi
SurrealDb__DataDirectory: data
volumes:
# Jedyny volumen aplikacji — trwałe dane (SurrealDB / RocksDB).
- ./data:/app/data
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s