mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
docs: files custom locations (#8627)
* Files Custom Locations * minimize * Easier maintenance * simplify information * default .env --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
0f74b17000
commit
07716bbff7
1 changed files with 50 additions and 0 deletions
50
docs/docs/guides/custom-locations.md
Normal file
50
docs/docs/guides/custom-locations.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Files Custom Locations
|
||||
|
||||
This guide explains storing generated and raw files with docker's volume mount in different locations.
|
||||
|
||||
:::note Backup
|
||||
It is important to remember to update the backup settings after following the guide to back up the new backup paths if using automatic backup tools.
|
||||
:::
|
||||
|
||||
In our `.env` file, we will define variables that will help us in the future when we want to move to a more advanced server in the future
|
||||
|
||||
```diff title=".env"
|
||||
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
|
||||
|
||||
# Custom location where your uploaded, thumbnails, and transcoded video files are stored
|
||||
- {UPLOAD_LOCATION}=./library
|
||||
+ {UPLOAD_LOCATION}=/custom/location/on/your/system/
|
||||
+ {THUMB_LOCATION}=/custom/location/on/your/system/
|
||||
+ {ENCODED_VIDEO_LOCATION}=/custom/location/on/your/system/
|
||||
...
|
||||
```
|
||||
|
||||
After defining the locations for these files, we will edit the `docker-compose.yml` file accordingly and add the new variables to the `immich-server` and `immich-microservices` containers.
|
||||
|
||||
```diff title="docker-compose.yml"
|
||||
services:
|
||||
immich-server:
|
||||
volumes:
|
||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||
+ - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
|
||||
+ - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
...
|
||||
|
||||
immich-microservices:
|
||||
volumes:
|
||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||
+ - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
|
||||
+ - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
```
|
||||
|
||||
Restart Immich to register the changes.
|
||||
|
||||
```
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Thanks to [Jrasm91](https://github.com/immich-app/immich/discussions/2110#discussioncomment-5477767) for writing the guide.
|
Loading…
Reference in a new issue