paperless-ringtail: add migrate initContainer (Nix split has no s6 migrate step)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
727818480d
commit
8293f5197c
1 changed files with 20 additions and 12 deletions
|
|
@ -1,13 +1,15 @@
|
|||
# Paperless-ngx on ringtail k3s — Nix image, multi-process.
|
||||
#
|
||||
# The upstream s6 image ran web + worker + scheduler + consumer in one
|
||||
# container. The Nix image (containers/paperless/default.nix) ships the
|
||||
# binaries but no supervisor, so we run those as four containers in one
|
||||
# pod, sharing the local data/consume dirs (emptyDir) and the NFS media
|
||||
# volume; redis is colocated so PAPERLESS_REDIS=localhost works for all.
|
||||
# The upstream s6 image ran web + worker + scheduler + consumer (and DB
|
||||
# migrations) in one container. The Nix image (containers/paperless/
|
||||
# default.nix) ships the binaries but no supervisor, so we run those as
|
||||
# four containers in one pod, sharing the local data/consume dirs
|
||||
# (emptyDir) and the NFS media volume; redis is colocated so
|
||||
# PAPERLESS_REDIS=localhost works for all. A migrate initContainer runs
|
||||
# DB migrations once before the app containers start.
|
||||
#
|
||||
# DB now points in-cluster at the ringtail blumeops-pg (was pg.ops.eblu.me
|
||||
# on indri). PAPERLESS_{DATA_DIR,MEDIA_ROOT,CONSUMPTION_DIR} are set
|
||||
# DB points in-cluster at the ringtail blumeops-pg (was pg.ops.eblu.me on
|
||||
# indri). PAPERLESS_{DATA_DIR,MEDIA_ROOT,CONSUMPTION_DIR} are set
|
||||
# explicitly because the Nix package does not default to the upstream
|
||||
# /usr/src/paperless paths.
|
||||
apiVersion: apps/v1
|
||||
|
|
@ -30,12 +32,10 @@ spec:
|
|||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: web
|
||||
initContainers:
|
||||
- name: migrate
|
||||
image: registry.ops.eblu.me/blumeops/paperless:kustomized
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
command: ["paperless-ngx", "migrate", "--no-input"]
|
||||
env: &paperless-env
|
||||
- name: PAPERLESS_URL
|
||||
value: "https://paperless.ops.eblu.me"
|
||||
|
|
@ -106,6 +106,14 @@ spec:
|
|||
mountPath: /usr/src/paperless/media
|
||||
- name: consume
|
||||
mountPath: /usr/src/paperless/consume
|
||||
containers:
|
||||
- name: web
|
||||
image: registry.ops.eblu.me/blumeops/paperless:kustomized
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env: *paperless-env
|
||||
volumeMounts: *paperless-mounts
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue