alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.56k stars 223 forks source link

🐛 [Nextcloud] Can't use MariaDB when self hosting it #1567

Closed zagi988 closed 1 month ago

zagi988 commented 2 months ago

Description

I'm trying to set a "database host" to my own MariaDB server but I can't because it is not reachable from the addon. Is there a way to fix that?

Reproduction steps

Start the addon and try to set it up using your own MariaDB server, not the addon.

Addon Logs

--------------------------------------------------------------------------------------------------------------
Nextcloud not installed, please wait for addon startup, login Webui, install Nextcloud, then restart the addon
--------------------------------------------------------------------------------------------------------------

/etc/cont-init.d/02-mariadb_discovery.sh: executing
/etc/cont-init.d/99-add_packages.sh: executing
[23:50:51] INFO: Installing additional apps :
... inotify-tools
/etc/cont-init.d/99-elasticsearch.sh: executing
/etc/cont-init.d/99-ocr.sh: executing
/etc/cont-init.d/99-trusted_domains.sh: executing

Starting the upstream container

[custom-init] No custom files found, skipping...
crond: crond (busybox 1.36.1) started, log level 8
[ls.io-init] done.
[10-Sep-2024 23:50:53] NOTICE: fpm is running, pid 1125
[10-Sep-2024 23:50:53] NOTICE: ready to handle connections

Architecture

amd64

OS

No response

alexbelgium commented 2 months ago

Hi, you should be able to set your own ENV variables using this method : https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-add-env-variables

zagi988 commented 2 months ago

Ok, but what ENV variable would I set to reach MariaDB which is reachable either over socket or over IP:port?

github-actions[bot] commented 2 months 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.

alexbelgium commented 2 months ago

Sorry actually I was wrong. When you initially set-up nextcloud, there is a setup wizard. That's where you define the external mariadb values. For example, the addon does not configures automatically the addon mariadb but just provides the informations to add in this form.

github-actions[bot] commented 2 months 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.

zagi988 commented 1 month ago

Sorry actually I was wrong. When you initially set-up nextcloud, there is a setup wizard. That's where you define the external mariadb values. For example, the addon does not configures automatically the addon mariadb but just provides the informations to add in this form.

You can't enter any external IP because docker doesn't give it access to local network. It should need local network access so I could map like 192.168.1.4 for db host address.

alexbelgium commented 1 month ago

From a container in HA you can access any external url. Docker doesn't give access to entering requests (only to expose ports) but outgoing requests are fine.