升级Immich 过程中遇到了一些数据库错误,看了官方仓库issues 解决方法是数据库降级,我也懒得折腾了,便直接重装了,方正也就两用户,还不如直接导入外部数据来的快。
使用docker compose 省时省力,不过在运行前需将外部存储路径挂载到容器内,很简单的在docker-compose.yaml文件 immich-server
和immich-microservices
中加入挂载路径即可,如下所示:
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
command: ['start.sh', 'immich']
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${UPLOAD_LOCATION}/old-library:/usr/src/old-library #就是这一行
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283:3001
depends_on:
- redis
- database
restart: always
immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
command: ['start.sh', 'microservices']
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${UPLOAD_LOCATION}/old-library:/usr/src/old-library #就是这一行
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always
最后在后台 External Library Management
处简单设置,重新扫描即可。
本文作者为Mr.Bai,转载请注明。