Add immich port to machine learning

This commit is contained in:
Daniel Cosme
2026-05-06 18:34:14 -04:00
parent f2703951ce
commit a283c9794f
2 changed files with 9 additions and 1 deletions

View File

@@ -16,7 +16,10 @@ spec:
app: immich-machine-learning app: immich-machine-learning
spec: spec:
containers: containers:
- image: ghcr.io/immich-app/immich-machine-learning:v2.7.5 - env:
- name: IMMICH_PORT
value: "2283"
image: ghcr.io/immich-app/immich-machine-learning:v2.7.5
name: immich-machine-learning name: immich-machine-learning
resources: {} resources: {}
volumeMounts: volumeMounts:

View File

@@ -82,6 +82,10 @@ func Stack() stack.Stack {
} }
func MachineLearning() apps.Deployment { func MachineLearning() apps.Deployment {
envMapping := map[string]string{
// "REDIS_PORT": fmt.Sprintf("%d", RedisPort),
"IMMICH_PORT": fmt.Sprintf("%d", root.Immich.Port),
}
cacheVol := kube.NewVolumeFrom(kube.VolumeSourcePVC, "cache", machine_learning_pvc.Name) cacheVol := kube.NewVolumeFrom(kube.VolumeSourcePVC, "cache", machine_learning_pvc.Name)
podSpec := core.PodSpec{ podSpec := core.PodSpec{
Containers: []core.Container{ Containers: []core.Container{
@@ -92,6 +96,7 @@ func MachineLearning() apps.Deployment {
Name: cacheVol.Name, Name: cacheVol.Name,
MountPath: "/cache", MountPath: "/cache",
}}, }},
Env: kube.NewEnvVar(envMapping),
}, },
}, },
Volumes: []core.Volume{cacheVol}, Volumes: []core.Volume{cacheVol},