mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-01 03:36:06 +02:00
Allow migration
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- SECURITY FIX : avoid hardcoding the postgres root password and change it if was already applied
|
- SECURITY FIX : avoid hardcoding the postgres root password and change it if was already applied
|
||||||
- Ensure host is reachable before starting
|
- Ensure host is reachable before starting
|
||||||
- Autocorrect homeassistant.local to local ip
|
- Autocorrect homeassistant.local to local ip
|
||||||
|
- Align configuration with /addon_configs
|
||||||
|
|
||||||
## 1.126.1 (15-02-2025)
|
## 1.126.1 (15-02-2025)
|
||||||
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
|
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ USER root
|
|||||||
|
|
||||||
# Global LSIO modifications
|
# Global LSIO modifications
|
||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
|
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
|
||||||
ARG CONFIGLOCATION="/config/addons_config/immich"
|
ARG CONFIGLOCATION="/config"
|
||||||
RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
|
RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
|
||||||
|
|
||||||
# Install REDIS
|
# Install REDIS
|
||||||
|
|||||||
@@ -85,10 +85,10 @@
|
|||||||
"image": "ghcr.io/alexbelgium/immich-{arch}",
|
"image": "ghcr.io/alexbelgium/immich-{arch}",
|
||||||
"init": false,
|
"init": false,
|
||||||
"map": [
|
"map": [
|
||||||
"media:rw",
|
"addon_config:rw",
|
||||||
"config:rw",
|
|
||||||
"addons:rw",
|
|
||||||
"backup:rw",
|
"backup:rw",
|
||||||
|
"homeassistant_config:rw",
|
||||||
|
"media:rw",
|
||||||
"share:rw",
|
"share:rw",
|
||||||
"ssl:rw"
|
"ssl:rw"
|
||||||
],
|
],
|
||||||
@@ -141,6 +141,6 @@
|
|||||||
"slug": "immich",
|
"slug": "immich",
|
||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
"version": "1.126.1-3",
|
"version": "1.126.1-4",
|
||||||
"webui": "http://[HOST]:[PORT:8080]"
|
"webui": "http://[HOST]:[PORT:8080]"
|
||||||
}
|
}
|
||||||
|
|||||||
22
immich/rootfs/etc/cont-init.d/01-migrate.sh
Normal file
22
immich/rootfs/etc/cont-init.d/01-migrate.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
MIGRATED=""
|
||||||
|
PREVIOUS_FOLDER="immich"
|
||||||
|
|
||||||
|
# Move main folder
|
||||||
|
if [ -f /homeassistant/addons_config/"$PREVIOUS_FOLDER"/config.yaml ]; then
|
||||||
|
bashio::log.warning "----------------------------------------"
|
||||||
|
bashio::log.warning "Migrating configuration to the new addon"
|
||||||
|
bashio::log.warning "----------------------------------------"
|
||||||
|
cp -rnp /homeassistant/addons_config/"$PREVIOUS_FOLDER"/ /config/
|
||||||
|
mv /homeassistant/addons_config/"$PREVIOUS_FOLDER" "$PREVIOUS_FOLDER"_migrated
|
||||||
|
if [ -d /config/addons_config ]; then rm -r /config/addons_config; fi
|
||||||
|
echo "Files moved to /addon_configs/$HOSTNAME"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Move autoscript
|
||||||
|
if [ -f /homeassistant/addons_autoscrips/immich.sh ]; then
|
||||||
|
cp -rnf /homeassistant/addons_autoscrips/"$PREVIOUS_FOLDER".sh /config/ &>/dev/null || true
|
||||||
|
bashio::log.yellow "... moved "$PREVIOUS_FOLDER".sh from /config/addons_autoscripts to /addon_configs/$HOSTNAME"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user