Skip to content

Commit

Permalink
Update initialization script to create media directories (#479)
Browse files Browse the repository at this point in the history
* Update initialization script to create media directories

- Added creation of new directories: `backups`, `profile`, `upload`, `thumbs`, and `encoded-video` within `${IMMICH_MEDIA_LOCATION}`.
- Ensured proper permissions are set for the new directories to maintain consistency.
The command

```bash

chown -R abc:abc \
    "${IMMICH_MEDIA_LOCATION}" \
    "${IMMICH_MEDIA_LOCATION}"/*
```
processes ${IMMICH_MEDIA_LOCATION}/library twice. If there are many files inside, it can significantly slow down the startup process.

* cleanup

---------

Co-authored-by: hydazz <alexanderhyde@icloud.com>
  • Loading branch information
nick322 and hydazz authored Jan 5, 2025
1 parent 4b82061 commit 627e6e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/init-config-immich/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
# make folders
mkdir -p \
/config/machine-learning/models \
"${IMMICH_MEDIA_LOCATION}/library"
"${IMMICH_MEDIA_LOCATION}"/{library,backups,profile,upload,thumbs,encoded-video}

# permissions
find /app/immich -path "*/node_modules" -prune -o -exec chown abc:abc {} +
chown -R abc:abc \
/config \
/config

chown abc:abc \
"${IMMICH_MEDIA_LOCATION}" \
"${IMMICH_MEDIA_LOCATION}"/*

Expand Down

0 comments on commit 627e6e6

Please sign in to comment.