Reapply "New config logic"

This reverts commit 2f690538c0.
This commit is contained in:
Alexandre
2024-10-15 12:30:10 +02:00
parent 2f690538c0
commit d8b0a2b92e
6 changed files with 23 additions and 19 deletions

View File

@@ -1,3 +1,5 @@
- Applied new homeassistant config logic, which will allow in the future all Mealie data to be backuped with the addon. All data (+ config) is moved to /addon_configs/db21ed7f_mealie ; the initial data currently in /homeassistant/addons_config/mealie_data and config in /homeassistant/addons_config/mealie will not be moved but a "migrated" file will be added to those folders to show that migration occured. From now on, only data in /addon_configs/db21ed7f_mealie will be used.
## v2.0-beta (10-10-2024) ## v2.0-beta (10-10-2024)
- Switched to v2.0 beta, should hopefully solve everyone's issues! - Switched to v2.0 beta, should hopefully solve everyone's issues!

View File

@@ -29,7 +29,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
# Correct data path # Correct data path
# hadolint ignore=DL4006 # hadolint ignore=DL4006
RUN grep -rl "/app/data" /app | xargs sed -i 's|/app/data|/config/addons_config/mealie_data|g' && \ RUN grep -rl "/app/data" /app | xargs sed -i 's|/app/data|/config|g' && \
sed -i "s|change_user$|# change_user|g" /app/run.sh sed -i "s|change_user$|# change_user|g" /app/run.sh
################## ##################

View File

@@ -65,7 +65,7 @@
"/dev/nvme2" "/dev/nvme2"
], ],
"environment": { "environment": {
"DATA_DIR": "/config/addons_config/mealie_data", "DATA_DIR": "/config",
"DB_ENGINE": "sqlite", "DB_ENGINE": "sqlite",
"MAX_WORKERS": "1", "MAX_WORKERS": "1",
"WEB_CONCURRENCY": "2", "WEB_CONCURRENCY": "2",
@@ -74,14 +74,15 @@
}, },
"image": "ghcr.io/alexbelgium/mealie-{arch}", "image": "ghcr.io/alexbelgium/mealie-{arch}",
"map": [ "map": [
"config:rw", "addon_config:rw",
"homeassistant_config:rw",
"share:rw", "share:rw",
"ssl:rw" "ssl:rw"
], ],
"name": "Mealie", "name": "Mealie",
"options": { "options": {
"ALLOW_SIGNUP": true, "ALLOW_SIGNUP": true,
"DATA_DIR": "/config/addons_config/mealie_data", "DATA_DIR": "/config",
"PGID": 1000, "PGID": 1000,
"PUID": 1000, "PUID": 1000,
"certfile": "fullchain.pem", "certfile": "fullchain.pem",

View File

@@ -35,23 +35,23 @@ done
# MIGRATE DATA DIR # # MIGRATE DATA DIR #
#################### ####################
#if [ -d /homeassistant/addons_config/mealie_data ] && [ ! -f /homeassistant/addons_config/mealie_data/migrated ]; then if [ -d /homeassistant/addons_config/mealie_data ] && [ ! -f /homeassistant/addons_config/mealie_data/migrated ]; then
# bashio::log.warning "Migrating data, current data will not be touched" bashio::log.warning "Migrating data, current data will not be touched"
# cp -rnf /homeassistant/addons_config/mealie_data/* /config/ || true cp -rnf /homeassistant/addons_config/mealie_data/* /config/ || true
# touch /homeassistant/addons_config/mealie_data/migrated touch /homeassistant/addons_config/mealie_data/migrated
#fi fi
#if [ -f /homeassistant/addons_config/mealie/config.yaml ] && [ ! -f /homeassistant/addons_config/mealie/migrated ]; then if [ -f /homeassistant/addons_config/mealie/config.yaml ] && [ ! -f /homeassistant/addons_config/mealie/migrated ]; then
# bashio::log.warning "Migrating config.yaml, current data will not be touched" bashio::log.warning "Migrating config.yaml, current data will not be touched"
# cp -nf /homeassistant/addons_config/mealie/config.yaml /config/ || true cp -nf /homeassistant/addons_config/mealie/config.yaml /config/ || true
# touch /homeassistant/addons_config/mealie/migrated touch /homeassistant/addons_config/mealie/migrated
#fi fi
############### ###############
# CONFIG YAML # # CONFIG YAML #
############### ###############
CONFIGSOURCE="/config/addons_config/mealie/config.yaml" CONFIGSOURCE="/config/config.yaml"
if [ -f "$CONFIGSOURCE" ]; then if [ -f "$CONFIGSOURCE" ]; then
bashio::log.info "config.yaml found in $CONFIGSOURCE, exporting variables" bashio::log.info "config.yaml found in $CONFIGSOURCE, exporting variables"

View File

@@ -51,7 +51,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
# Correct data path # Correct data path
# hadolint ignore=DL4006 # hadolint ignore=DL4006
RUN grep -rl "/app/data" /app | xargs sed -i 's|/app/data|/config/addons_config/mealie_data|g' && \ RUN grep -rl "/app/data" /app | xargs sed -i 's|/app/data|/config|g' && \
sed -i "s|change_user$|# change_user|g" /app/run.sh sed -i "s|change_user$|# change_user|g" /app/run.sh
################## ##################

View File

@@ -65,7 +65,7 @@
"/dev/nvme2" "/dev/nvme2"
], ],
"environment": { "environment": {
"DATA_DIR": "/config/addons_config/mealie_data", "DATA_DIR": "/config",
"DB_ENGINE": "sqlite", "DB_ENGINE": "sqlite",
"MAX_WORKERS": "1", "MAX_WORKERS": "1",
"WEB_CONCURRENCY": "2", "WEB_CONCURRENCY": "2",
@@ -75,7 +75,8 @@
"image": "ghcr.io/alexbelgium/test-{arch}", "image": "ghcr.io/alexbelgium/test-{arch}",
"ingress": true, "ingress": true,
"map": [ "map": [
"config:rw", "addon_config:rw",
"homeassistant_config:rw",
"share:rw", "share:rw",
"ssl:rw" "ssl:rw"
], ],
@@ -83,7 +84,7 @@
"options": { "options": {
"ALLOW_SIGNUP": true, "ALLOW_SIGNUP": true,
"BASE_SUBPATH": "/mealie", "BASE_SUBPATH": "/mealie",
"DATA_DIR": "/config/addons_config/mealie_data", "DATA_DIR": "/config",
"PGID": 1000, "PGID": 1000,
"PUID": 1000, "PUID": 1000,
"certfile": "fullchain.pem", "certfile": "fullchain.pem",