forked from AmIBeingObtuse/Youtubestacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImmich Add External Library
151 lines (122 loc) · 5.61 KB
/
Immich Add External Library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
This will help you add an external library to immich.
A copy of my compose and env is at the bottom of this page!
BACKUP FIRST!!!!!!!!! I DON'T TAKE RESPONSIBILITY FOR ANY NEGATIVE EFFECTS.
Alternatively use the instructions below:
1. Go to your compose and env file. Add the following to your env file:
EXTERNAL_LOCATION=C:\Users\keith\Pictures\Immich external #Choose a dir on your host.
2. Go to your compose file and add the following under the upload location in both immich server and micro services under the volumes section:
- ${EXTERNAL_LOCATION}:/usr/src/app/external
So your volumes section should look like this:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${EXTERNAL_LOCATION}:/usr/src/app/external
Again make sure you did that for both immich server section and micro services section in your compose!
Now docker compose up/deploy/what ever you use to start the docker containers and compose file.
Be aware it could take a few minutes for immich to restart everything.
3. Go into your immich server and click on administration. The next to your user click the edit icon. Scroll down until you see external path and enter:
/usr/src/app/external
Click confirm.
4. Top right click your avatar it is a coloured circle with the first letter of your username and click account settings. Scroll down to libraries and click create external library.
5. Click the 3 dot menu next to your new libary and then add path. You will then enter the dir we created above:
/usr/src/app/external
6. Click the 3 dot menu next to your new libary again this time selecting scan new library files.
Immich will then add your external library contents to your server without moving the files.
They should be in date order so if a photo was taken in december 2022 you will need to scroll down to december 2022 to find it.
My compose and env file looks like this:
-----------------------------------------------
version: "3.8"
#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#
name: immich
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
- ${EXTERNAL_LOCATION}:/usr/src/app/external
- /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
- ${EXTERNAL_LOCATION}:/usr/src/app/external
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always
immich-machine-learning:
container_name: 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:${IMMICH_VERSION:-release}
# 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:
- model-cache:/cache
env_file:
- .env
restart: always
redis:
container_name: immich_redis
image: redis:6.2-alpine@sha256:afb290a0a0d0b2bd7537b62ebff1eb84d045c757c1c31ca2ca48c79536c0de82
restart: always
database:
container_name: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
env_file:
- .env
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
volumes:
pgdata: null
model-cache: null
networks: {}
My env file looks like this:
-----------------------------------------------------
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=C:\Users\keith\Documents\dockerdesktopdata\immch\Uploads
# External, set path in administrative settings under the user first. Then update here to map. Then Go to user settings and setup the path in the external library.
EXTERNAL_LOCATION=C:\Users\keith\Pictures\Immich external
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION="v1.94.1"
# Connection secret for postgres. You should change it to a random password the below is random and not my password.
DB_PASSWORD=Wfdgsdfgh543fgdfgdfsghsgh5464566ZwouNFZyS7hb%rgeEDo4D2
# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis