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:
@@ -0,0 +1,31 @@
|
||||
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
|
||||
Reference in New Issue
Block a user