build(docker): pull image from Gitea registry in compose template

Switch the compose example from local build to pulling the full registry path git.rtynski.pl/rtynski/hy2026, default the host port to 8075 and add a commented external ovh_net network.
This commit is contained in:
Rafał Tyński
2026-10-03 21:16:11 +02:00
parent 46178d915a
commit 9d28d23e45
2 changed files with 21 additions and 11 deletions
+20 -10
View File
@@ -2,29 +2,29 @@
#
# Użycie:
# cp docker-compose.yaml.example docker-compose.yaml
# docker compose up --build
# docker compose pull
# docker compose up -d
#
# Aplikacja: http://localhost:8080
# Obraz pobierany z rejestru Gitea (pełna ścieżka):
# git.rtynski.pl/rtynski/hy2026:<wersja>
#
# Aplikacja: http://localhost:8075
# Dane: ./data (bind mount, trwałe, SurrealDB embedded RocksDB)
name: tarninahub
services:
app:
# Obraz budowany lokalnie z Dockerfile (multi-stage: klient Vue + backend .NET).
image: tarninahub:${APP_VERSION:-0.0.1}
build:
context: .
dockerfile: Dockerfile
args:
APP_VERSION: ${APP_VERSION:-0.0.1}
# Obraz z rejestru Gitea — pobierany przez `docker compose pull`.
# `latest` domyślnie; konkretną wersję ustaw przez APP_VERSION, np. 0.0.1.
image: git.rtynski.pl/rtynski/hy2026:${APP_VERSION:-latest}
container_name: tarninahub
restart: unless-stopped
# RocksDB zapisuje do bind-mountu ./data; root upraszcza uprawnienia (MVP).
# W produkcji użyj named volume albo dopasuj właściciela katalogu ./data.
user: "0:0"
ports:
- "${TARNINAHUB_PORT:-8080}:8080"
- "${TARNINAHUB_PORT:-8075}:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:8080
@@ -40,9 +40,19 @@ services:
volumes:
# Jedyny volumen aplikacji — trwałe dane (SurrealDB / RocksDB).
- ./data:/app/data
# Podłączenie do zewnętrznej sieci (odkomentuj razem z blokiem `networks`).
# networks:
# - ovh_net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# Zewnętrzna sieć (opcjonalnie) — odkomentuj, aby podłączyć usługę do
# istniejącej sieci hosta. Pamiętaj też odkomentować `networks:` w `app`.
# networks:
# ovh_net:
# external:
# name: ovh_net