alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.48k stars 213 forks source link

[Mealie] Unable to locate custom environment variables #1558

Open user34756361233 opened 2 weeks ago

user34756361233 commented 2 weeks ago

Description

When I install Mealie it creates a folder at /Volumes/addon_configs/db21ed7f_mealie but the logs shows Mealie is looking for the config file in /config/addons_config/mealie/config.yaml and reverts to using default parameters. Strangely, it shows all the info from config.yaml file in the logs (redacted for security), so I assume it must be reading it.

If I move the config file to /config/addons_config/mealie/config.yaml it creates a new file at /Volumes/addon_configs/db21ed7f_mealie

this is a copy of bug report 1556 but I am experiencing the same problem. As this ticket has been closed but the bug is still there I opened this report

Reproduction steps

1. Install addon
2. Start add-on (logs say no config file)

Addon Logs

-----------------------------------------------------------
 Add-on: Mealie
 Mealie is a self-hosted recipe manager and meal planner built in Vue
-----------------------------------------------------------
 Add-on version: v1.12.0-2
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.8.3
 Home Assistant Supervisor: 2024.08.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
 Defining permissions for main user : 
User UID: 1000
User GID : 1000
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
ALLOW_SIGNUP='true'
DATA_DIR='/config'
PGID='1000'
PUID='1000'
certfile='fullchain.pem'
keyfile='privkey.pem'
ssl='true'
Timezone set from Etc/UTC to Europe/London
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /addon_configs/db21ed7f-mealie/config.yaml
---------------------------------------------------------
Wiki here on how to use: [https://github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables](https://github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables)

SMTP_HOST='[REDACTED]'
SMTP_PORT='587'
SMTP_FROM_NAME='Mealie'
SMTP_AUTH_STRATEGY='TLS'
SMTP_FROM_EMAIL='[REDACTED]'
SMTP_USER='[REDACTED]'
SMTP_PASSWORD='[REDACTED]'
BASE_URL='https://192.168.X.XXX:9090'
OPENAI_API_KEY='[REDACTED]'
OPENAI_MODEL='gpt-4'
OPENAI_ENABLE_IMAGE_SERVICES='True'
OPENAI_WORKERS='2'
OPENAI_REQUEST_TIMEOUT='60'
OPENAI_BASE_URL='https://api.openai.com/v1'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /addon_configs/db21ed7f-mealie/mealie.sh if existing
Wiki here: [https://github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation](https://github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation)
/etc/cont-init.d/31-nginx.sh: executing
[16:06:53] INFO: Exporting variables
ALLOW_SIGNUP=true
DATA_DIR=/config
PGID=1000
PUID=1000
certfile=fullchain.pem
keyfile=privkey.pem
ssl=true
[16:06:54] INFO: No config.yaml found in /config/addons_config/mealie/config.yaml, using default parameters
Permissions adapted
[16:06:54] INFO: Starting nginx
[16:06:54] INFO: Starting app
INFO     2024-08-29T16:07:04 - Started server process [7]
INFO     2024-08-29T16:07:04 - Waiting for application startup.
INFO     2024-08-29T16:07:04 - start: database initialization
INFO     2024-08-29T16:07:04 - Database connection established.
INFO     2024-08-29T16:07:04 - Context impl SQLiteImpl.
INFO     2024-08-29T16:07:04 - Will assume non-transactional DDL.
INFO     2024-08-29T16:07:04 - Checking for migration data fixes
INFO     2024-08-29T16:07:05 - end: database initialization
INFO     2024-08-29T16:07:05 - -----SYSTEM STARTUP-----
INFO     2024-08-29T16:07:05 - ------APP SETTINGS------
INFO     2024-08-29T16:07:05 - {
    "TESTING": false,
    "PRODUCTION": true,
    "LOG_CONFIG_OVERRIDE": null,
    "LOG_LEVEL": "info",
    "theme": {
        "light_primary": "#E58325",
        "light_accent": "#007A99",
        "light_secondary": "#973542",
        "light_success": "#43A047",
        "light_info": "#1976D2",
        "light_warning": "#FF6D00",
        "light_error": "#EF5350",
        "dark_primary": "#E58325",
        "dark_accent": "#007A99",
        "dark_secondary": "#973542",
        "dark_success": "#43A047",
        "dark_info": "#1976D2",
        "dark_warning": "#FF6D00",
        "dark_error": "#EF5350"
    },
    "BASE_URL": "http://localhost:8080",
    "STATIC_FILES": "/spa/static",
    "IS_DEMO": false,
    "HOST_IP": "*",
    "API_HOST": "0.0.0.0",
    "API_PORT": 9000,
    "API_DOCS": true,
    "TOKEN_TIME": 48,
    "GIT_COMMIT_HASH": "0d06494bbfc62fc8a1771a85fd308190891d6167",
    "ALLOW_SIGNUP": true,
    "DAILY_SCHEDULE_TIME": "23:45",
    "SECURITY_MAX_LOGIN_ATTEMPTS": 5,
    "SECURITY_USER_LOCKOUT_TIME": 24,
    "DB_ENGINE": "sqlite",
    "DEFAULT_GROUP": "Home",
    "SMTP_HOST": null,
    "SMTP_PORT": "587",
    "SMTP_FROM_NAME": "Mealie",
    "SMTP_FROM_EMAIL": null,
    "SMTP_AUTH_STRATEGY": "TLS",
    "LDAP_AUTH_ENABLED": false,
    "LDAP_SERVER_URL": null,
    "LDAP_TLS_INSECURE": false,
    "LDAP_TLS_CACERTFILE": null,
    "LDAP_ENABLE_STARTTLS": false,
    "LDAP_BASE_DN": null,
    "LDAP_QUERY_BIND": null,
    "LDAP_QUERY_PASSWORD": null,
    "LDAP_USER_FILTER": null,
    "LDAP_ADMIN_FILTER": null,
    "LDAP_ID_ATTRIBUTE": "uid",
    "LDAP_MAIL_ATTRIBUTE": "mail",
    "LDAP_NAME_ATTRIBUTE": "name",
    "OIDC_AUTH_ENABLED": false,
    "OIDC_CLIENT_ID": null,
    "OIDC_CONFIGURATION_URL": null,
    "OIDC_SIGNUP_ENABLED": true,
    "OIDC_USER_GROUP": null,
    "OIDC_ADMIN_GROUP": null,
    "OIDC_AUTO_REDIRECT": false,
    "OIDC_PROVIDER_NAME": "OAuth",
    "OIDC_REMEMBER_ME": false,
    "OIDC_SIGNING_ALGORITHM": "RS256",
    "OIDC_USER_CLAIM": "email",
    "OIDC_GROUPS_CLAIM": "groups",
    "OIDC_TLS_CACERTFILE": null,
    "OPENAI_BASE_URL": null,
    "OPENAI_API_KEY": null,
    "OPENAI_MODEL": "gpt-4o",
    "OPENAI_ENABLE_IMAGE_SERVICES": true,
    "OPENAI_WORKERS": 2,
    "OPENAI_SEND_DATABASE_DATA": true,
    "OPENAI_REQUEST_TIMEOUT": 60,
    "WORKER_PER_CORE": 1,
    "UVICORN_WORKERS": 1
}
INFO     2024-08-29T16:07:05 - Daily tasks scheduled for 2024-08-29 22:45:00+00:00
INFO     2024-08-29T16:07:05 - Application startup complete.
INFO     2024-08-29T16:07:05 - Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)

Architecture

amd64

OS

Virtual Machine

kk-sonata commented 2 weeks ago

Also getting this bug. The workaround in #1556 works, but @alexbelgium a suggestion: SMTP_PASSWORD should be masked in the addon log for security

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

user34756361233 commented 1 week ago

Bump, no solution yet?

Krispkiwi commented 1 week ago

Currently watching this as well

github-actions[bot] commented 2 days ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mbobbar commented 2 days ago

Also watching this, though the workaround was effective in getting back up and running.