Services are ready.
This commit is contained in:
+18
-16
@@ -3,29 +3,33 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
immichVersion = "v2.5.6";
|
||||
redisVersion = "9@sha256:546304417feac0874c3dd576e0952c6bb8f06bb4093ea0c9ca303c73cf458f63";
|
||||
databaseVersion = "14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23";
|
||||
helper = import ./lib.nix { inherit config pkgs lib; };
|
||||
cfg = config.numbus.services.immich;
|
||||
in
|
||||
|
||||
helper.mkPodmanService {
|
||||
name = "immich";
|
||||
description = "Immich, Google Photos but better";
|
||||
defaultPort = "2283";
|
||||
name = "immich";
|
||||
pod = "immich";
|
||||
defaultPort = "2283";
|
||||
|
||||
# Compose file good
|
||||
composeText = ''
|
||||
services:
|
||||
immich-server:
|
||||
image: ghcr.io/immich-app/immich-server:latest
|
||||
container_name: immich-server
|
||||
hostname: immich-server
|
||||
image: ghcr.io/immich-app/immich-server:${immichVersion}
|
||||
user: '1000:1000'
|
||||
networks:
|
||||
immich:
|
||||
ports:
|
||||
- "${cfg.port}:2283/tcp"
|
||||
volumes:
|
||||
- ${cfg.dataDir}:/data
|
||||
- $UPLOAD_LOCATION:/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
env_file:
|
||||
- .env
|
||||
@@ -40,14 +44,16 @@ helper.mkPodmanService {
|
||||
- NET_RAW
|
||||
restart: unless-stopped
|
||||
immich-machine-learning:
|
||||
image: ghcr.io/immich-app/immich-machine-learning:latest
|
||||
container_name: immich-machine-learning
|
||||
hostname: immich-machine-learning
|
||||
image: ghcr.io/immich-app/immich-machine-learning:${immichVersion}
|
||||
user: '1000:1000'
|
||||
networks:
|
||||
immich:
|
||||
volumes:
|
||||
- ${cfg.configDir}/machine-learning:/cache
|
||||
- ${cfg.configDir}/model-cache:/cache
|
||||
- ${cfg.configDir}/machine-learning-config:/usr/src/.config
|
||||
- ${cfg.configDir}/machine-learning-cache:/usr/src/.cache/
|
||||
env_file:
|
||||
- .env
|
||||
healthcheck:
|
||||
@@ -58,34 +64,30 @@ helper.mkPodmanService {
|
||||
- NET_RAW
|
||||
restart: unless-stopped
|
||||
immich-redis:
|
||||
image: docker.io/valkey/valkey:8-bookworm
|
||||
container_name: immich-redis
|
||||
hostname: immich-redis
|
||||
image: docker.io/valkey/valkey:${redisVersion}
|
||||
user: '1000:1000'
|
||||
networks:
|
||||
immich:
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- NET_RAW
|
||||
restart: unless-stopped
|
||||
immich-database:
|
||||
image: ghcr.io/immich-app/postgres:14
|
||||
container_name: immich-database
|
||||
hostname: immich-database
|
||||
user: '1000:1000'
|
||||
image: ghcr.io/immich-app/postgres:${databaseVersion}
|
||||
user: '999:999'
|
||||
networks:
|
||||
immich:
|
||||
shm_size: 128mb
|
||||
volumes:
|
||||
- ${cfg.configDir}/database:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: $DB_PASSWORD
|
||||
POSTGRES_USER: $DB_USERNAME
|
||||
POSTGRES_DB: $DB_DATABASE_NAME
|
||||
POSTGRES_INITDB_ARGS: '--data-checksums'
|
||||
volumes:
|
||||
- $DB_DATA_LOCATION:/var/lib/postgresql/data
|
||||
shm_size: 128mb
|
||||
healthcheck:
|
||||
disable: false
|
||||
security_opt:
|
||||
|
||||
Reference in New Issue
Block a user