- .gitea/workflows/release.yaml: on vX.Y.Z tags run checks, build and push the image to the Gitea registry (X.Y.Z, X.Y, latest), create a release from the CHANGELOG section - scripts/release-notes.mjs: extract changelog section, create the release - deploy/compose.yaml: server setup using the released image - APP_VERSION build arg, shown in the header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
# Production compose for the server: runs the released image from the Gitea registry.
|
|
# (The compose.yaml in the repo root builds the image locally instead.)
|
|
#
|
|
# cp ../.env.example .env # fill in, AUTH_URL = public URL
|
|
# docker compose pull && docker compose up -d
|
|
#
|
|
# Pin a version with KANAME_VERSION=0.4.0 in .env (default: latest).
|
|
|
|
name: kaname
|
|
|
|
x-app: &app
|
|
image: git.linxweiler.xyz/pascallinxweiler/kaname:${KANAME_VERSION:-latest}
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: file:/data/app.db
|
|
MODELS_DIR: /models
|
|
HF_HOME: /data/hf-home
|
|
restart: unless-stopped
|
|
init: true
|
|
|
|
services:
|
|
worker:
|
|
<<: *app
|
|
command: ["node", "dist/worker.mjs"]
|
|
volumes:
|
|
- data:/data
|
|
- models:/models
|
|
stop_grace_period: 20s
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "find /tmp/kaname-worker-alive -mmin -1 | grep -q ."]
|
|
interval: 10s
|
|
timeout: 5s
|
|
start_period: 30s
|
|
retries: 3
|
|
|
|
web:
|
|
<<: *app
|
|
command: ["node_modules/.bin/next", "start"]
|
|
ports:
|
|
- "${WEB_PORT:-3000}:3000"
|
|
volumes:
|
|
- data:/data
|
|
depends_on:
|
|
worker:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
data: # SQLite + hf home; keep on local disk (SQLite and NFS don't mix)
|
|
models: # downloaded models; will become an NFS mount from TrueNAS
|