From 2e8cbd60616eb60e4d4865e19e110d064e29d364 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 26 Oct 2024 16:27:54 +0200 Subject: [PATCH] add bundle:docker-immich --- bundles/docker-immich/metadata.py | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 bundles/docker-immich/metadata.py diff --git a/bundles/docker-immich/metadata.py b/bundles/docker-immich/metadata.py new file mode 100644 index 0000000..b41ea36 --- /dev/null +++ b/bundles/docker-immich/metadata.py @@ -0,0 +1,64 @@ +assert node.has_bundle('docker-engine') +assert node.has_bundle('redis') +assert not node.has_bundle('postgresql') # docker container uses that port + +defaults = { + 'docker-engine': { + 'containers': { + 'immich': { + 'image': 'ghcr.io/imagegenius/immich:latest', + 'environment': { + 'DB_DATABASE_NAME': 'immich', + 'DB_HOSTNAME': 'host.docker.internal', + 'DB_PASSWORD': repo.vault.password_for(f'{node.name} postgresql immich'), + 'DB_USERNAME': 'immich', + 'REDIS_HOSTNAME': 'host.docker.internal', + }, + 'volumes': { + 'config': '/config', + 'libraries': '/libraries', + 'photos': '/photos', + }, + 'needs': { + 'svc_systemd:docker-postgresql14', + }, + 'requires': { + 'docker-postgresql14.service', + }, + }, + 'postgresql14': { + 'image': 'tensorchord/pgvecto-rs:pg14-v0.2.0', + 'environment': { + 'POSTGRES_PASSWORD': repo.vault.password_for(f'{node.name} postgresql immich'), + 'POSTGRES_USER': 'immich', + 'POSTGRES_DB': 'immich', + }, + 'volumes': { + 'database': '/var/lib/postgresql/data', + }, + }, + }, + }, + 'nginx': { + 'vhosts': { + 'immich': { + 'locations': { + '/': { + 'target': 'http://127.0.0.1:8080/', + 'websockets': True, + 'max_body_size': '500m', + }, + #'/api/socket.io/': { + # 'target': 'http://127.0.0.1:8081/', + # 'websockets': True, + #}, + }, + }, + }, + }, + 'redis': { + 'bind': '0.0.0.0', + }, +} + +