Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate immich to dynamic compose #4974

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/immich/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"exposable": true,
"port": 8128,
"id": "immich",
"tipi_version": 104,
"tipi_version": 105,
"version": "1.115.0",
"min_tipi_version": "3.6.2",
"categories": ["data", "photography"],
"description": "Photo and video backup solution directly from your mobile phone.",
"short_desc": "Photo and video backup solution directly from your mobile phone.",
Expand Down Expand Up @@ -34,6 +35,7 @@
}
],
"supported_architectures": ["arm64", "amd64"],
"dynamic_config": true,
sergi0g marked this conversation as resolved.
Show resolved Hide resolved
"created_at": 1691943801422,
"updated_at": 1726211612000
"updated_at": 1727005741000
}
89 changes: 89 additions & 0 deletions apps/immich/docker-compose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"$schema": "../compose-schema.json",
"services": [
{
"name": "immich",
"image": "ghcr.io/immich-app/immich-server:v1.115.0",
"volumes": [
{
"hostPath": "${ROOT_FOLDER_HOST}/media/data/images/immich",
"containerPath": "/usr/src/app/upload"
}
],
"environment": {
"NODE_ENV": "production",
"DB_HOSTNAME": "immich-db",
"DB_USERNAME": "tipi",
"DB_PASSWORD": "${DB_PASSWORD}",
"ENABLE_MAPBOX": "false",
"DB_DATABASE_NAME": "immich",
"REDIS_HOSTNAME": "immich-redis",
"JWT_SECRET": "${JWT_SECRET}"
},
"dependsOn": [
"immich-redis",
"immich-db"
],
"internalPort": 3001,
"isMain": true
},
{
"name": "immich-machine-learning",
"image": "ghcr.io/immich-app/immich-machine-learning:v1.115.0",
"volumes": [
{
"hostPath": "${ROOT_FOLDER_HOST}/media/data/images/immich",
"containerPath": "/usr/src/app/upload"
},
{
"hostPath": "${APP_DATA_DIR}/data/immich-ml-cache",
"containerPath": "/cache"
}
],
"environment": {
"NODE_ENV": "production",
"DB_HOSTNAME": "immich-db",
"DB_USERNAME": "tipi",
"DB_PASSWORD": "${DB_PASSWORD}",
"DB_NAME": "immich",
"DB_DATABASE_NAME": "immich"
},
"dependsOn": [
"immich-db"
]
},
{
"name": "immich-redis",
"image": "redis:6.2",
"healthCheck": {
"test": "redis-cli ping || exit 1",
"interval": "30s",
"timeout": "1m",
"retries": 5
}
},
{
"name": "immich-db",
"image": "tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0",
"environment": {
"POSTGRES_PASSWORD": "${DB_PASSWORD}",
"POSTGRES_USER": "tipi",
"POSTGRES_DB": "immich",
"PG_DATA": "/var/lib/postgresql/data"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/db",
"containerPath": "/var/lib/postgresql/data"
}
],
"healthCheck": {

Check failure on line 80 in apps/immich/docker-compose.json

View workflow job for this annotation

GitHub Actions / ci

"services[3].healthCheck" must have required property 'timeout'

Check failure on line 80 in apps/immich/docker-compose.json

View workflow job for this annotation

GitHub Actions / ci

"services[3].healthCheck" must have required property 'retries'
"test": "pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum=\"$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')\"; echo \"checksum failure count is $$Chksum\"; [ \"$$Chksum\" = '0' ] || exit 1",
"interval": "5m",
"startInterval": "30s",
"startPeriod": "5m"
},
sergi0g marked this conversation as resolved.
Show resolved Hide resolved
"command": ["postgres", "-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"]

Check failure on line 86 in apps/immich/docker-compose.json

View workflow job for this annotation

GitHub Actions / ci

"services[3].command" must be string
}
]
}
Loading