AI 迁移提示
本文由 AI 协助从旧站迁移,尚未完成逐篇人工审校;内容如有疏漏,将在复核后修订。
Immich 是一款自托管照片和视频管理软件,支持 Web、Android、iOS 多端同步,保护用户隐私。
官网:immich.app | 安装文档:docker-compose
信息
Immich 使用 PostgreSQL 作为数据库,如需独立部署参见:Ubuntu 安装 PostgreSQL 与常用配置
下载配置文件
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
docker-compose.yml(支持 Intel 核显 OpenVINO)
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
devices:
- /dev/dri:/dev/dri
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
# 反向地理编码汉化
- ./geodata-cn/geodata:/build/geodata
- ./geodata-cn/i18n-iso-countries/langs:/usr/src/app/server/node_modules/i18n-iso-countries/langs
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino
devices:
- /dev/dri:/dev/dri
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:9
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache:
.env 配置
UPLOAD_LOCATION=./library DB_DATA_LOCATION=./postgres TZ=Asia/Shanghai IMMICH_VERSION=v2 DB_PASSWORD=postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich
警告
DB_PASSWORD=postgres 是示例值。部署前请改为随机强密码,并妥善备份 .env 文件。
提醒
使用国内镜像加速:
sed -i 's|ghcr\.io|ghcr.example.com|g' docker-compose.yml sed -i 's|docker\.io|docker.example.com|g' docker-compose.yml
扩展功能
- 中文地理编码:ZingLix/immich-geodata-cn
- 中文 CLIP 模型:参考 Bilibili 教程
评论区
评论加载中...