mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
refactor: rewrite immich_dev to match template conventions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+64
-9
@@ -1,23 +1,78 @@
|
||||
# Immich
|
||||
|
||||
* [Documentation](https://immich.app/docs/install/docker-compose/)
|
||||
* [Documentation for env variables](https://immich.app/docs/install/environment-variables)
|
||||
## Overview
|
||||
|
||||
Reverse Poxy Port: 2283
|
||||
Self-hosted photo and video management solution with a mobile app,
|
||||
machine-learning powered search, and face recognition. This stack runs the
|
||||
Immich server, a machine-learning service, Redis, and a pgvecto.rs
|
||||
(Postgres) database.
|
||||
|
||||
## Import
|
||||
## Project Details
|
||||
|
||||
1. Go the the Administrator and [External Libraries](http://localhost:8000/admin/library-management)
|
||||
- **Project Repository:** [GitHub](https://github.com/immich-app/immich)
|
||||
- **Container Image:** [ghcr.io](https://github.com/immich-app/immich/pkgs/container/immich-server)
|
||||
- **Compose Example:** [Docs](https://immich.app/docs/install/docker-compose/)
|
||||
- **Documentation:** [Docs](https://immich.app/docs)
|
||||
- **Reverse Proxy Port:** `2283`
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Start the containers: `docker compose up -d`
|
||||
2. Open http://localhost:8000 in your browser
|
||||
3. Follow the initial setup wizard to create the admin account
|
||||
|
||||
## Environment Variable Notes
|
||||
|
||||
See the [environment variable documentation](https://immich.app/docs/install/environment-variables).
|
||||
|
||||
IMMICH_IMAGE – immich server image/tag
|
||||
IMMICH_ML_IMAGE – machine-learning service image/tag (add -cuda, -openvino, or -armnn for hardware acceleration)
|
||||
IMMICH_PORT – host port mapped to the server's internal port 2283
|
||||
IMMICH_DB_PASSWORD / IMMICH_DB_USERNAME / IMMICH_DB_DATABASE_NAME – Postgres credentials, shared between the server and the database
|
||||
|
||||
## Volume Notes
|
||||
|
||||
${VOL_PATH}/immich/upload – uploaded photo/video library
|
||||
${VOL_PATH}/immich/import – drop files here for external library import
|
||||
${VOL_PATH}/immich/model-cache – downloaded machine-learning models
|
||||
${VOL_PATH}/immich/postgres – database data
|
||||
|
||||
## Network Notes
|
||||
|
||||
Requires proxy network. Redis, Postgres, and the machine-learning service
|
||||
only join the internal network.
|
||||
|
||||
## Docker Run
|
||||
|
||||
Not practical for this stack — Immich needs the server, machine-learning,
|
||||
Redis, and Postgres containers together. Use the compose file.
|
||||
|
||||
## Additional Notes / Gotchas
|
||||
|
||||
### Import
|
||||
|
||||
1. Go to the Administrator and [External Libraries](http://localhost:8000/admin/library-management)
|
||||
1. Choose the path: ```/import```
|
||||
1. Place your files in the immich-import directory.
|
||||
1. run the [Job](http://localhost:8000/admin/jobs-status) External Libraries
|
||||
1. Place your files in the import directory.
|
||||
1. Run the [Job](http://localhost:8000/admin/jobs-status) External Libraries
|
||||
|
||||
## Upgrades
|
||||
### Upgrades
|
||||
|
||||
The version tags can be confusing here.
|
||||
I go to the releases page: https://github.com/immich-app/immich/releases
|
||||
and then bump to that release: IMMICH_IMAGE=ghcr.io/immich-app/immich-server:v1.143.1
|
||||
|
||||
## Note
|
||||
### Env changes not applying
|
||||
|
||||
If the env file doesn't work after a change, try running ```docker compose up -d --force-recreate```.
|
||||
|
||||
## Dockhand Stack, Deploy from Git
|
||||
|
||||
Cookbooks Repository
|
||||
stackname: immich
|
||||
Compose file path: immich_dev/compose.yaml
|
||||
Additional env file (optional): immich_dev/sample.env
|
||||
|
||||
Then "Load" immich_dev/sample.env into the Environmental variables in dockhand
|
||||
|
||||
Create the Stack
|
||||
|
||||
@@ -1,51 +1,66 @@
|
||||
services:
|
||||
immich-server:
|
||||
image: ${IMMICH_IMAGE}
|
||||
image: ${IMMICH_IMAGE:-ghcr.io/immich-app/immich-server:release}
|
||||
restart: ${IMMICH_RESTART:-unless-stopped}
|
||||
# extends:
|
||||
# file: hwaccel.transcoding.yml
|
||||
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
|
||||
volumes:
|
||||
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
|
||||
- ${VOL_PATH:-./data}/immich-upload:/usr/src/app/upload
|
||||
- ${VOL_PATH:-./data}/immich-import:/import
|
||||
- ${VOL_PATH:-/data}/immich/upload:/usr/src/app/upload
|
||||
- ${VOL_PATH:-/data}/immich/import:/import
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- REDIS_HOSTNAME=${IMMICH_REDIS_HOSTNAME:-immich-redis}
|
||||
- DB_HOSTNAME=${IMMICH_DB_HOSTNAME:-immich-postgres}
|
||||
- DB_PASSWORD=${IMMICH_DB_PASSWORD:-postgres}
|
||||
- REDIS_HOSTNAME=immich-redis
|
||||
- DB_HOSTNAME=immich-postgres
|
||||
- DB_PASSWORD=${IMMICH_DB_PASSWORD:-changeme}
|
||||
- DB_USERNAME=${IMMICH_DB_USERNAME:-postgres}
|
||||
- DB_DATABASE_NAME=${IMMICH_DB_DATABASE_NAME:-immich}
|
||||
ports:
|
||||
- "${IMMICH_PORT:-8000}:2283"
|
||||
networks:
|
||||
- proxy
|
||||
- immich_internal
|
||||
depends_on:
|
||||
- immich-redis
|
||||
- immich-postgres
|
||||
healthcheck:
|
||||
disable: false
|
||||
ports:
|
||||
- "8000:2283"
|
||||
|
||||
immich-machine-learning:
|
||||
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
|
||||
# Example tag: ${IMMICH_VERSION:-release}-cuda
|
||||
image: ghcr.io/immich-app/immich-machine-learning:release
|
||||
# Example tag: ghcr.io/immich-app/immich-machine-learning:release-cuda
|
||||
image: ${IMMICH_ML_IMAGE:-ghcr.io/immich-app/immich-machine-learning:release}
|
||||
restart: ${IMMICH_RESTART:-unless-stopped}
|
||||
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
|
||||
# file: hwaccel.ml.yml
|
||||
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
|
||||
volumes:
|
||||
- ${VOL_PATH:-./data}/model-cache:/cache
|
||||
- ${VOL_PATH:-/data}/immich/model-cache:/cache
|
||||
networks:
|
||||
- immich_internal
|
||||
healthcheck:
|
||||
disable: false
|
||||
|
||||
immich-redis:
|
||||
image: ${REDIS_IMAGE}
|
||||
image: ${REDIS_IMAGE:-redis:6.2.19-alpine}
|
||||
restart: ${IMMICH_RESTART:-unless-stopped}
|
||||
networks:
|
||||
- immich_internal
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
|
||||
immich-postgres:
|
||||
image: ${POSTGRES_IMAGE}
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${IMMICH_DB_PASSWORD:-postgrespass}
|
||||
POSTGRES_USER: ${IMMICH_DB_USERNAME:-postgres}
|
||||
POSTGRES_DB: ${IMMICH_DB_DATABASE_NAME:-immich}
|
||||
POSTGRES_INITDB_ARGS: '--data-checksums'
|
||||
image: ${POSTGRES_IMAGE:-tensorchord/pgvecto-rs:pg14-v0.2.0}
|
||||
restart: ${IMMICH_RESTART:-unless-stopped}
|
||||
volumes:
|
||||
- ${VOL_PATH:-./data}/immich-postgres:/var/lib/postgresql/data
|
||||
- ${VOL_PATH:-/data}/immich/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=${IMMICH_DB_PASSWORD:-changeme}
|
||||
- POSTGRES_USER=${IMMICH_DB_USERNAME:-postgres}
|
||||
- POSTGRES_DB=${IMMICH_DB_DATABASE_NAME:-immich}
|
||||
- POSTGRES_INITDB_ARGS=--data-checksums
|
||||
networks:
|
||||
- immich_internal
|
||||
healthcheck:
|
||||
test: >-
|
||||
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
|
||||
@@ -63,3 +78,9 @@ services:
|
||||
-c max_wal_size=2GB
|
||||
-c shared_buffers=512MB
|
||||
-c wal_compression=on
|
||||
|
||||
networks:
|
||||
immich_internal:
|
||||
driver: bridge
|
||||
proxy:
|
||||
external: true
|
||||
+8
-18
@@ -1,22 +1,12 @@
|
||||
# IMMICH
|
||||
# Immich
|
||||
# documentation for env variables: https://immich.app/docs/install/environment-variables
|
||||
|
||||
## Global
|
||||
VOL_PATH=./data
|
||||
TZ=America/Vancouver
|
||||
|
||||
## App
|
||||
VOL_PATH=/data
|
||||
IMMICH_IMAGE=ghcr.io/immich-app/immich-server:release
|
||||
IMMICH_UPLOAD_LOCATION=./library
|
||||
IMMICH_DB_DATA_LOCATION=./postgres
|
||||
IMMICH_DB_HOSTNAME=immich-postgres
|
||||
IMMICH_DB_PASSWORD=postgres
|
||||
IMMICH_ML_IMAGE=ghcr.io/immich-app/immich-machine-learning:release
|
||||
REDIS_IMAGE=redis:6.2.19-alpine
|
||||
POSTGRES_IMAGE=tensorchord/pgvecto-rs:pg14-v0.2.0
|
||||
IMMICH_RESTART=unless-stopped
|
||||
IMMICH_PORT=8000
|
||||
IMMICH_DB_PASSWORD=changeme
|
||||
IMMICH_DB_USERNAME=postgres
|
||||
IMMICH_DB_DATABASE_NAME=immich
|
||||
IMMICH_REDIS_HOSTNAME=immich-redis
|
||||
|
||||
# REDIS
|
||||
REDIS_IMAGE=redis:6.2.19-alpine
|
||||
|
||||
# POSTGRES
|
||||
POSTGRES_IMAGE=tensorchord/pgvecto-rs:pg14-v0.2.0
|
||||
Reference in New Issue
Block a user