Rename tline to porthole
This commit is contained in:
26
README.md
26
README.md
@@ -10,13 +10,13 @@ Porthole: timeline media library (Next.js web + worker), backed by Postgres/Redi
|
|||||||
- set `images.web.repository/tag` and `images.worker.repository/tag`
|
- set `images.web.repository/tag` and `images.worker.repository/tag`
|
||||||
- set `global.tailscale.tailnetFQDN` (recommended), or set `app.minio.publicEndpointTs` (must be `https://minio.<tailnet-fqdn>`)
|
- set `global.tailscale.tailnetFQDN` (recommended), or set `app.minio.publicEndpointTs` (must be `https://minio.<tailnet-fqdn>`)
|
||||||
|
|
||||||
- Render locally: `helm template porthole helm/tline -f your-values.yaml --namespace porthole`
|
- Render locally: `helm template porthole helm/porthole -f your-values.yaml --namespace porthole`
|
||||||
|
|
||||||
- Install (to `porthole` namespace): `helm upgrade --install porthole helm/tline -f your-values.yaml --namespace porthole`
|
- Install (to `porthole` namespace): `helm upgrade --install porthole helm/porthole -f your-values.yaml --namespace porthole`
|
||||||
|
|
||||||
## ArgoCD
|
## ArgoCD
|
||||||
|
|
||||||
A ready-to-apply ArgoCD `Application` manifest is included at `argocd/tline-application.yaml` (it deploys the Helm release name `porthole`).
|
A ready-to-apply ArgoCD `Application` manifest is included at `argocd/porthole-application.yaml` (it deploys the Helm release name `porthole`).
|
||||||
|
|
||||||
Reference example (deploys into the `porthole` namespace; the Helm chart itself does not hardcode a namespace):
|
Reference example (deploys into the `porthole` namespace; the Helm chart itself does not hardcode a namespace):
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ spec:
|
|||||||
source:
|
source:
|
||||||
repoURL: git@gitea-gitea-ssh.taildb3494.ts.net:will/porthole.git
|
repoURL: git@gitea-gitea-ssh.taildb3494.ts.net:will/porthole.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: helm/tline
|
path: helm/porthole
|
||||||
helm:
|
helm:
|
||||||
releaseName: porthole
|
releaseName: porthole
|
||||||
valueFiles:
|
valueFiles:
|
||||||
@@ -42,7 +42,7 @@ spec:
|
|||||||
# - name: global.tailscale.tailnetFQDN
|
# - name: global.tailscale.tailnetFQDN
|
||||||
# value: tailxyz.ts.net
|
# value: tailxyz.ts.net
|
||||||
# - name: images.web.repository
|
# - name: images.web.repository
|
||||||
# value: registry.lan:5000/tline-web
|
# value: registry.lan:5000/porthole-web
|
||||||
# - name: images.web.tag
|
# - name: images.web.tag
|
||||||
# value: dev
|
# value: dev
|
||||||
destination:
|
destination:
|
||||||
@@ -89,25 +89,25 @@ This repo is a Bun monorepo, but container builds use Docker Buildx.
|
|||||||
- Your Docker daemon is configured to allow that registry as an insecure registry.
|
- Your Docker daemon is configured to allow that registry as an insecure registry.
|
||||||
|
|
||||||
- Create/use a buildx builder (one-time):
|
- Create/use a buildx builder (one-time):
|
||||||
- `docker buildx create --name tline --use`
|
- `docker buildx create --name porthole --use`
|
||||||
|
|
||||||
- Build + push **web** (Next standalone):
|
- Build + push **web** (Next standalone):
|
||||||
- `REGISTRY=registry.lan:5000 TAG=dev`
|
- `REGISTRY=registry.lan:5000 TAG=dev`
|
||||||
- `docker buildx build --platform linux/amd64,linux/arm64 -f apps/web/Dockerfile -t "$REGISTRY/tline-web:$TAG" --push .`
|
- `docker buildx build --platform linux/amd64,linux/arm64 -f apps/web/Dockerfile -t "$REGISTRY/porthole-web:$TAG" --push .`
|
||||||
- Notes:
|
- Notes:
|
||||||
- The Dockerfile uses `bun install --frozen-lockfile` and copies all workspace `package.json` files first to keep Bun from mutating `bun.lock`.
|
- The Dockerfile uses `bun install --frozen-lockfile` and copies all workspace `package.json` files first to keep Bun from mutating `bun.lock`.
|
||||||
- Runtime entrypoint comes from Next standalone output (the image runs `node app/apps/web/server.js`).
|
- Runtime entrypoint comes from Next standalone output (the image runs `node app/apps/web/server.js`).
|
||||||
|
|
||||||
- Build + push **worker** (includes `ffmpeg` + `exiftool`):
|
- Build + push **worker** (includes `ffmpeg` + `exiftool`):
|
||||||
- `REGISTRY=registry.lan:5000 TAG=dev`
|
- `REGISTRY=registry.lan:5000 TAG=dev`
|
||||||
- `docker buildx build --platform linux/amd64,linux/arm64 -f apps/worker/Dockerfile -t "$REGISTRY/tline-worker:$TAG" --push .`
|
- `docker buildx build --platform linux/amd64,linux/arm64 -f apps/worker/Dockerfile -t "$REGISTRY/porthole-worker:$TAG" --push .`
|
||||||
- Notes:
|
- Notes:
|
||||||
- The Dockerfile uses `bun install --frozen-lockfile --production` and also copies all workspace `package.json` files first for stable `workspace:*` resolution.
|
- The Dockerfile uses `bun install --frozen-lockfile --production` and also copies all workspace `package.json` files first for stable `workspace:*` resolution.
|
||||||
|
|
||||||
- Then set Helm values:
|
- Then set Helm values:
|
||||||
- `images.web.repository: registry.lan:5000/tline-web`
|
- `images.web.repository: registry.lan:5000/porthole-web`
|
||||||
- `images.web.tag: dev`
|
- `images.web.tag: dev`
|
||||||
- `images.worker.repository: registry.lan:5000/tline-worker`
|
- `images.worker.repository: registry.lan:5000/porthole-worker`
|
||||||
- `images.worker.tag: dev`
|
- `images.worker.tag: dev`
|
||||||
|
|
||||||
### Private registry auth (optional)
|
### Private registry auth (optional)
|
||||||
@@ -167,7 +167,7 @@ This chart assumes you label nodes like:
|
|||||||
- Pi 5 nodes: `node-class=compute`
|
- Pi 5 nodes: `node-class=compute`
|
||||||
- Pi 3 node: `node-class=tiny`
|
- Pi 3 node: `node-class=tiny`
|
||||||
|
|
||||||
The default scheduling in `helm/tline/values.yaml` pins heavy pods to `node-class=compute`.
|
The default scheduling in `helm/porthole/values.yaml` pins heavy pods to `node-class=compute`.
|
||||||
|
|
||||||
Example `values.yaml` you can start from:
|
Example `values.yaml` you can start from:
|
||||||
|
|
||||||
@@ -181,10 +181,10 @@ secrets:
|
|||||||
|
|
||||||
images:
|
images:
|
||||||
web:
|
web:
|
||||||
repository: registry.lan:5000/tline-web
|
repository: registry.lan:5000/porthole-web
|
||||||
tag: dev
|
tag: dev
|
||||||
worker:
|
worker:
|
||||||
repository: registry.lan:5000/tline-worker
|
repository: registry.lan:5000/porthole-worker
|
||||||
tag: dev
|
tag: dev
|
||||||
|
|
||||||
global:
|
global:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ spec:
|
|||||||
source:
|
source:
|
||||||
repoURL: git@gitea-ssh.gitea.svc:will/porthole.git
|
repoURL: git@gitea-ssh.gitea.svc:will/porthole.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: helm/tline
|
path: helm/porthole
|
||||||
helm:
|
helm:
|
||||||
releaseName: porthole
|
releaseName: porthole
|
||||||
valueFiles:
|
valueFiles:
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: tline
|
name: porthole
|
||||||
description: Timeline media library (porthole)
|
description: Timeline media library (porthole)
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
@@ -105,8 +105,11 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- $label = .Values.minio.tailscaleServiceS3.hostnameLabel -}}
|
{{- $label = .Values.minio.tailscaleServiceS3.hostnameLabel -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- printf "https://%s.%s" $label .Values.global.tailscale.tailnetFQDN -}}
|
{{- printf "https://%s.%s" $label .Values.global.tailscale.tailnetFQDN -}}
|
||||||
|
{{- else if .Values.minio.enabled -}}
|
||||||
|
{{- $svc := include "tline.componentName" (dict "Values" .Values "Chart" .Chart "Release" .Release "component" "minio") -}}
|
||||||
|
{{- printf "http://%s:%d" $svc (.Values.minio.service.s3Port | int) -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- fail "app.minio.publicEndpointTs is required (or set global.tailscale.tailnetFQDN to derive it)" -}}
|
{{- fail "app.minio.publicEndpointTs is required when minio.enabled=false and no tailscale tailnetFQDN is set" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
{{- if not .Values.secrets.existingSecret -}}
|
{{- if not .Values.secrets.existingSecret -}}
|
||||||
|
{{- $existing := lookup "v1" "Secret" .Release.Namespace (include "tline.secretName" .) -}}
|
||||||
|
{{- $existingData := dict -}}
|
||||||
|
{{- if $existing -}}
|
||||||
|
{{- $existingData = (get $existing "data") | default dict -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $pgPassB64 := (get $existingData "POSTGRES_PASSWORD") | default (randAlphaNum 32 | b64enc) -}}
|
||||||
|
{{- $minioKeyB64 := (get $existingData "MINIO_ACCESS_KEY_ID") | default (randAlphaNum 20 | b64enc) -}}
|
||||||
|
{{- $minioSecretB64 := (get $existingData "MINIO_SECRET_ACCESS_KEY") | default (randAlphaNum 40 | b64enc) -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
@@ -7,9 +15,9 @@ metadata:
|
|||||||
{{ include "tline.labels" . | indent 4 }}
|
{{ include "tline.labels" . | indent 4 }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
POSTGRES_PASSWORD: {{ required "secrets.postgres.password is required" .Values.secrets.postgres.password | b64enc }}
|
POSTGRES_PASSWORD: {{ .Values.secrets.postgres.password | default ($pgPassB64 | b64dec) | b64enc }}
|
||||||
MINIO_ACCESS_KEY_ID: {{ required "secrets.minio.accessKeyId is required" .Values.secrets.minio.accessKeyId | b64enc }}
|
MINIO_ACCESS_KEY_ID: {{ .Values.secrets.minio.accessKeyId | default ($minioKeyB64 | b64dec) | b64enc }}
|
||||||
MINIO_SECRET_ACCESS_KEY: {{ required "secrets.minio.secretAccessKey is required" .Values.secrets.minio.secretAccessKey | b64enc }}
|
MINIO_SECRET_ACCESS_KEY: {{ .Values.secrets.minio.secretAccessKey | default ($minioSecretB64 | b64dec) | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.registrySecret.create -}}
|
{{- if .Values.registrySecret.create -}}
|
||||||
@@ -28,7 +28,7 @@ scheduling:
|
|||||||
|
|
||||||
app:
|
app:
|
||||||
name: porthole
|
name: porthole
|
||||||
queueName: tline
|
queueName: porthole
|
||||||
|
|
||||||
# Optional overrides when bringing your own services.
|
# Optional overrides when bringing your own services.
|
||||||
databaseUrl: "" # defaults to in-chart Postgres when empty
|
databaseUrl: "" # defaults to in-chart Postgres when empty
|
||||||
@@ -45,9 +45,9 @@ secrets:
|
|||||||
existingSecret: "" # if set, chart will not create secrets
|
existingSecret: "" # if set, chart will not create secrets
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
user: tline
|
user: porthole
|
||||||
password: "" # REQUIRED if not using existingSecret
|
password: "" # REQUIRED if not using existingSecret
|
||||||
database: tline
|
database: porthole
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
accessKeyId: "" # REQUIRED if not using existingSecret
|
accessKeyId: "" # REQUIRED if not using existingSecret
|
||||||
@@ -55,12 +55,14 @@ secrets:
|
|||||||
|
|
||||||
images:
|
images:
|
||||||
web:
|
web:
|
||||||
repository: ""
|
# Default is a local/in-cluster registry example; override for your environment.
|
||||||
tag: ""
|
repository: registry.lan:5000/porthole-web
|
||||||
|
tag: dev
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
worker:
|
worker:
|
||||||
repository: ""
|
# Default is a local/in-cluster registry example; override for your environment.
|
||||||
tag: ""
|
repository: registry.lan:5000/porthole-worker
|
||||||
|
tag: dev
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
postgres:
|
postgres:
|
||||||
repository: postgres
|
repository: postgres
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "tline",
|
"name": "porthole",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Timeline media library (porthole)",
|
"description": "Timeline media library (porthole)",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import IORedis from "ioredis";
|
|||||||
|
|
||||||
const envSchema = z.object({
|
const envSchema = z.object({
|
||||||
REDIS_URL: z.string().min(1).default("redis://localhost:6379"),
|
REDIS_URL: z.string().min(1).default("redis://localhost:6379"),
|
||||||
QUEUE_NAME: z.string().min(1).default("tline")
|
QUEUE_NAME: z.string().min(1).default("porthole")
|
||||||
});
|
});
|
||||||
|
|
||||||
export const jobNameSchema = z.enum([
|
export const jobNameSchema = z.enum([
|
||||||
|
|||||||
Reference in New Issue
Block a user