move immich container to nfss
This commit is contained in:
parent
a02fd21f14
commit
cc26c13cac
5 changed files with 89 additions and 81 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
ffmpeg = {
|
||||
accel = "qsv";
|
||||
accelDecode = false;
|
||||
accelDecode = true;
|
||||
|
||||
acceptedAudioCodecs = [ "aac" "mp3" "libopus" "pcm_s16le" ];
|
||||
acceptedContainers = [ "mov" "ogg" "webm" ];
|
||||
|
|
|
|||
|
|
@ -10,5 +10,83 @@ in
|
|||
# Container definitions for nfss host
|
||||
virtualisation.oci-containers.containers = {
|
||||
|
||||
# Immich photo and video backup system
|
||||
immich = {
|
||||
image = "ghcr.io/imagegenius/immich:latest";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/immich/config:/config"
|
||||
"/var/lib/immich/int-lib:/photos"
|
||||
# "/mnt/essd/DCIM:/ext-lib:ro"
|
||||
"${immichConfigFile}:/config/immich.json:ro"
|
||||
];
|
||||
|
||||
environment = {
|
||||
PUID = commonUID;
|
||||
PGID = commonGID;
|
||||
TZ = systemTZ;
|
||||
# Point to the mounted config file
|
||||
IMMICH_CONFIG_FILE = "/config/immich.json";
|
||||
# Database connection (keep as env vars for security)
|
||||
DB_HOSTNAME = "immich-db";
|
||||
DB_USERNAME = "postgres";
|
||||
DB_PASSWORD = "postgres";
|
||||
DB_DATABASE_NAME = "postgres";
|
||||
DB_PORT = "5432";
|
||||
# Redis connection
|
||||
REDIS_HOSTNAME = "immich-redis";
|
||||
REDIS_PORT = "6379";
|
||||
# Machine Learning server (internal)
|
||||
MACHINE_LEARNING_HOST = "0.0.0.0";
|
||||
MACHINE_LEARNING_PORT = "3003";
|
||||
MACHINE_LEARNING_WORKERS = "1";
|
||||
MACHINE_LEARNING_WORKER_TIMEOUT = "120";
|
||||
};
|
||||
|
||||
ports = [
|
||||
"8080:8080"
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
"--device=/dev/dri:/dev/dri" # Hardware acceleration
|
||||
];
|
||||
|
||||
dependsOn = [ "immich-db" "immich-redis" ];
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
# PostgreSQL database for Immich with vector extension
|
||||
immich-db = {
|
||||
image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/immich/db:/var/lib/postgresql/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
POSTGRES_PASSWORD = "postgres";
|
||||
POSTGRES_USER = "postgres";
|
||||
POSTGRES_DB = "postgres";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
];
|
||||
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
# Redis cache for Immich
|
||||
immich-redis = {
|
||||
image = "docker.io/redis:7.2-alpine";
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
];
|
||||
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@
|
|||
"zfs.zfs_arc_min=2147483648" # 2GB min ARC size
|
||||
];
|
||||
|
||||
fileSystems."/mnt/essd" = {
|
||||
device = "/dev/disk/by-uuid/20251dfb-f99a-4393-8c9e-0bb26d04b718";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt/essd 0755 yanlin users -"
|
||||
];
|
||||
|
||||
# Network configuration
|
||||
networking = {
|
||||
hostName = "nfss";
|
||||
|
|
|
|||
|
|
@ -19,84 +19,5 @@ in
|
|||
# Container definitions for thinkpad host
|
||||
virtualisation.oci-containers.containers = {
|
||||
|
||||
# Immich photo and video backup system
|
||||
immich = {
|
||||
image = "ghcr.io/imagegenius/immich:latest";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/immich/config:/config"
|
||||
"/var/lib/immich/int-lib:/photos"
|
||||
"/home/yanlin/DCIM:/ext-lib"
|
||||
# Mount the declarative config file
|
||||
"${immichConfigFile}:/config/immich.json:ro"
|
||||
];
|
||||
|
||||
environment = {
|
||||
PUID = commonUID;
|
||||
PGID = commonGID;
|
||||
TZ = systemTZ;
|
||||
# Point to the mounted config file
|
||||
IMMICH_CONFIG_FILE = "/config/immich.json";
|
||||
# Database connection (keep as env vars for security)
|
||||
DB_HOSTNAME = "immich-db";
|
||||
DB_USERNAME = "postgres";
|
||||
DB_PASSWORD = "postgres";
|
||||
DB_DATABASE_NAME = "postgres";
|
||||
DB_PORT = "5432";
|
||||
# Redis connection
|
||||
REDIS_HOSTNAME = "immich-redis";
|
||||
REDIS_PORT = "6379";
|
||||
# Machine Learning server (internal)
|
||||
MACHINE_LEARNING_HOST = "0.0.0.0";
|
||||
MACHINE_LEARNING_PORT = "3003";
|
||||
MACHINE_LEARNING_WORKERS = "1";
|
||||
MACHINE_LEARNING_WORKER_TIMEOUT = "120";
|
||||
};
|
||||
|
||||
ports = [
|
||||
"5000:8080"
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
"--device=/dev/dri:/dev/dri" # Hardware acceleration
|
||||
];
|
||||
|
||||
dependsOn = [ "immich-db" "immich-redis" ];
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
# PostgreSQL database for Immich with vector extension
|
||||
immich-db = {
|
||||
image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/immich/db:/var/lib/postgresql/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
POSTGRES_PASSWORD = "postgres";
|
||||
POSTGRES_USER = "postgres";
|
||||
POSTGRES_DB = "postgres";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
];
|
||||
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
# Redis cache for Immich
|
||||
immich-redis = {
|
||||
image = "docker.io/redis:7.2-alpine";
|
||||
|
||||
extraOptions = [
|
||||
"--network=podman"
|
||||
];
|
||||
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
photo = {
|
||||
loadBalancer = {
|
||||
servers = [{
|
||||
url = "http://thinkpad.yanlincs.com:5000";
|
||||
url = "http://nfss.yanlincs.com:8080";
|
||||
}];
|
||||
serversTransport = "longTimeout@file";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue