blob: 12b7c3bb7a01b0754f8596ff5bc34690ac9a6cfd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
apiVersion: v1
kind: Pod
metadata:
name: immich
labels:
traefik.enable: true
traefik.http.routers.immich.tls: true
traefik.http.routers.immich.tls.certresolver: le
traefik.http.routers.immich.entrypoints: http,https
traefik.http.routers.immich.rule: Host(`photos.gzr.im`)
traefik.http.routers.immich.service: immich
traefik.http.services.immich.loadbalancer.server.port: 2283
# metrics
# https://immich.app/docs/features/monitoring
# https://github.com/immich-app/immich/blob/v1.121.0/docker/prometheus.yml
traefik.http.services.immich-api-metrics.loadbalancer.server.port: 8081
traefik.http.services.immich-svc-metrics.loadbalancer.server.port: 8082
traefik.http.routers.immich-api-metrics.entrypoints: metrics
traefik.http.routers.immich-api-metrics.rule: Path(`/metrics/immich-api`)
traefik.http.routers.immich-api-metrics.middlewares: replacepath-metrics@file
traefik.http.routers.immich-api-metrics.service: immich-api-metrics
traefik.http.routers.immich-svc-metrics.entrypoints: metrics
traefik.http.routers.immich-svc-metrics.rule: Path(`/metrics/immich-svc`)
traefik.http.routers.immich-svc-metrics.middlewares: replacepath-metrics@file
traefik.http.routers.immich-svc-metrics.service: immich-svc-metrics
spec:
restartPolicy: Always
dnsPolicy: Default
containers:
- name: immich
image: ghcr.io/immich-app/immich-server:v${version}
envFrom:
- secretRef:
name: immich
env:
- name: IMMICH_CONFIG_FILE
value: /immich.yaml
- name: IMMICH_TELEMETRY_INCLUDE
value: all
ports:
- containerPort: 2283
protocol: TCP
# NOTE: hostPort is required to make local net broadcasting work
hostPort: 2283
# api metrics
- containerPort: 8081
protocol: TCP
# microservice metrics
- containerPort: 8082
protocol: TCP
livenessProbe:
httpGet:
path: /api/server/ping
port: 2283
volumeMounts:
- name: config
mountPath: /immich.yaml
- name: data
mountPath: /usr/src/app/upload
- name: media
mountPath: /media
readOnly: true
resources:
requests:
podman.io/device=/dev/dri/card0: 1
podman.io/device=/dev/dri/renderD128: 1
limits:
memory: 512Mi
- name: redis
image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
livenessProbe:
exec:
command: ["sh", "-c", "redis-cli ping || exit 1"]
- name: postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
envFrom:
- secretRef:
name: immich
env:
- name: POSTGRES_INITDB_ARGS
value: --data-checksums
volumeMounts:
- name: pg-data
mountPath: /var/lib/postgresql/data
livenessProbe:
exec:
command: ["pg_isready", "--dbname='$DB_DATABASE_NAME'", "--username='$DB_USERNAME'"]
command:
- docker-entrypoint.sh
- -c
- shared_preload_libraries=vectors.so
- -c
- search_path="$$user", public, vectors
- -c
- logging_collector=on
- -c
- max_wal_size=2GB
- -c
- shared_buffers=512MB
- -c
- wal_compression=on
volumes:
- name: config
hostPath:
path: /var/lib/immich/immich.yaml
type: File
- name: data
hostPath:
path: /var/lib/immich/app
type: DirectoryOrCreate
- name: pg-data
hostPath:
path: /var/lib/immich/db
type: DirectoryOrCreate
- name: media
hostPath:
path: /media/hayasui/media
type: Directory
|