Default: Image wird aus git.pkop.de/vibecode/watchlist:<version> gepullt. Version via WATCHSTACK_VERSION ueberschreibbar, liest sonst aus app/__init__.py. Opt-in Profile "local" baut das Image lokal aus dem Dockerfile (Dev-Workflow, Port 8001 damit Registry-Variante parallel laeuft). docker compose up -d # Registry-Image docker compose --profile local up -d --build # lokal WATCHSTACK_VERSION=0.6.0 docker compose pull && up -d Verifiziert: pull rc=0, up rc=0, health -> version=0.5.1-beta.
This commit is contained in:
+49
-5
@@ -1,13 +1,31 @@
|
||||
# Komponiert WatchStack mit persistentem Daten-Volume.
|
||||
# Komponiert WatchStack.
|
||||
#
|
||||
# Standard (empfohlen, Beta):
|
||||
# Image wird aus der Gitea Container Registry gezogen — kein lokaler
|
||||
# Build noetig. Version liegt in app/__init__.py (single source of truth).
|
||||
#
|
||||
# docker compose up -d
|
||||
# -> http://localhost:8000
|
||||
#
|
||||
# Lokal bauen (Development):
|
||||
# docker compose --profile local up -d --build
|
||||
# => baut aus dem Dockerfile statt aus der Registry
|
||||
#
|
||||
# Andere Version ziehen:
|
||||
# WATCHSTACK_VERSION=0.6.0 docker compose pull && docker compose up -d
|
||||
#
|
||||
# Optional: Reverse-Proxy (caddy/traefik) davorschalten.
|
||||
|
||||
# Optional: vorgebautes Image aus dist/ verwenden
|
||||
# image: watchstack:0.5.1-beta
|
||||
# Wird vom .env oder der Umgebung ueberschrieben, wenn vorhanden.
|
||||
# Hinweis: Gitea-Pfad ist LOWERCASE (Vibecode/watchlist -> vibecode/watchlist),
|
||||
# weil Docker-Repository-Namen kleingeschrieben sein muessen.
|
||||
x-watchstack-version: &watchstack_version ${WATCHSTACK_VERSION:-0.5.1-beta}
|
||||
x-gitea-image: &gitea_image git.pkop.de/vibecode/watchlist:${WATCHSTACK_VERSION:-0.5.1-beta}
|
||||
|
||||
services:
|
||||
watchstack:
|
||||
build: .
|
||||
image: watchstack:beta
|
||||
# Standard: Image aus der Gitea Container Registry.
|
||||
image: *gitea_image
|
||||
container_name: watchstack
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -27,6 +45,32 @@ services:
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Lokaler Build (Development) — ueber opt-in Profile aktivierbar:
|
||||
# docker compose --profile local up -d --build
|
||||
watchstack-local:
|
||||
profiles: ["local"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: watchstack:local
|
||||
container_name: watchstack-local
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${WATCHSTACK_PORT:-8001}:8000" # anderer Port, damit Registry-Variante parallel laufen kann
|
||||
environment:
|
||||
WATCHSTACK_HOST: "0.0.0.0"
|
||||
WATCHSTACK_PORT: "8000"
|
||||
WATCHSTACK_WORKERS: "2"
|
||||
WATCHSTACK_DATA_DIR: "/data"
|
||||
volumes:
|
||||
- watchstack-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request,sys,os; r=urllib.request.urlopen('http://127.0.0.1:8000/api/health',timeout=3); sys.exit(0 if r.status==200 else 1)"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
watchstack-data:
|
||||
name: watchstack-data
|
||||
|
||||
Reference in New Issue
Block a user