mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
mariadb: Collection of small improvements (#909)
* mariadb: Prettier YAML & JSON files * mariadb: Move data files into data folder * mariadb: Update add-on URL * mariadb: Tweaks to documentation and changelog
This commit is contained in:
committed by
Pascal Vizeli
parent
b30fe9c749
commit
f1f67a6d67
@@ -1,13 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3
|
||||
|
||||
- Update from bash to bashio
|
||||
|
||||
## 1.2
|
||||
|
||||
- Change the way to migrate data
|
||||
|
||||
## 1.1
|
||||
|
||||
- Fix connection issue with 10.3.13
|
||||
|
||||
## 1.0
|
||||
|
||||
- Update MariaDB to 10.3.13
|
||||
|
||||
@@ -8,7 +8,7 @@ ENV LANG C.UTF-8
|
||||
RUN apk add --no-cache mariadb mariadb-client
|
||||
|
||||
# Copy data
|
||||
COPY run.sh /
|
||||
COPY mariadb-server.cnf /etc/my.cnf.d/
|
||||
COPY data/run.sh /
|
||||
COPY data/mariadb-server.cnf /etc/my.cnf.d/
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
@@ -10,18 +10,18 @@ You can use this add-on to install MariaDB, which is an open-source (GPLv2 licen
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is straightforward and easy to do.
|
||||
Follow these steps to get the add-on installed on your system:
|
||||
|
||||
1. Navigate in your Home Assistant frontend to **Hass.io** -> **Add-on Store**.
|
||||
1. Find the "MariaDB" add-on and click it.
|
||||
1. Click on the "INSTALL" button.
|
||||
2. Find the "MariaDB" add-on and click it.
|
||||
3. Click on the "INSTALL" button.
|
||||
|
||||
## How to use
|
||||
|
||||
1. Set the `logins` -> `password` field to something strong and unique.
|
||||
1. Start the add-on.
|
||||
1. Check the add-on log output to see the result.
|
||||
1. Add `recorder` component to your Home Assistnat configuration.
|
||||
2. Start the add-on.
|
||||
3. Check the add-on log output to see the result.
|
||||
4. Add `recorder` component to your Home Assistant configuration.
|
||||
|
||||
## Add-on Configuration
|
||||
|
||||
@@ -55,21 +55,21 @@ Example add-on configuration:
|
||||
|
||||
### Option: `databases` (required)
|
||||
|
||||
Database name, e.g., `homeassistant`
|
||||
Database name, e.g., `homeassistant`. Multiple are allowed.
|
||||
|
||||
### Option: `logins` (required)
|
||||
|
||||
This section defines a create user definition in MariaDB. [Create User][createuser] documentation.
|
||||
|
||||
### Option: `logins` -> `username` (required)
|
||||
### Option: `logins.username` (required)
|
||||
|
||||
Database user login, e.g., `hass`. [User Name][username] documentation.
|
||||
|
||||
### Option: `logins` -> `host` (required)
|
||||
### Option: `logins.host` (required)
|
||||
|
||||
Hostname allowed to connect to database. [Host Name][hostname] documentation.
|
||||
|
||||
### Option: `logins` -> `password` (required)
|
||||
### Option: `logins.password` (required)
|
||||
|
||||
Password for user login. This should be strong and unique.
|
||||
|
||||
@@ -77,25 +77,25 @@ Password for user login. This should be strong and unique.
|
||||
|
||||
This section grant privileges to users in MariaDB. [Grant][grant] documentation.
|
||||
|
||||
### Option: `rights` -> `username` (required)
|
||||
### Option: `rights.username` (required)
|
||||
|
||||
This should be the same user name defined in `logins` -> `username`.
|
||||
|
||||
### Option: `rights` -> `host` (required)
|
||||
### Option: `rights.host` (required)
|
||||
|
||||
This should be the same hostname defined in `logins` -> `host`.
|
||||
|
||||
### Option: `rights` -> `database` (required)
|
||||
### Option: `rights.database` (required)
|
||||
|
||||
This should be the same database defined in `databases`.
|
||||
|
||||
### Option: `rights` -> `grant` (required)
|
||||
### Option: `rights.grant` (required)
|
||||
|
||||
This is the grant statement giving your user access to the databse.
|
||||
This is the grant statement giving your user access to the database.
|
||||
|
||||
## Home Assistant Configuration
|
||||
|
||||
MariaDB will be used by the `recorder` and `history` components within Home Assistant. For more information about setting this up, see the [MariaDB][mariadb-hass] documentation for Home Assistant.
|
||||
MariaDB will be used by the `recorder` and `history` components within Home Assistant. For more information about setting this up, see the [MariaDB][mariadb-hass] documentation for Home Assistant.
|
||||
|
||||
Example Home Assistant configuration:
|
||||
|
||||
|
||||
@@ -3,20 +3,19 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- mariadb/*
|
||||
- mariadb/*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionBuilder
|
||||
value: '2.0'
|
||||
value: "2.0"
|
||||
- group: docker
|
||||
|
||||
|
||||
jobs:
|
||||
- template: /.azure/azp-template-addon.yml
|
||||
parameters:
|
||||
addon: 'mariadb'
|
||||
arch: '--all'
|
||||
- template: /.azure/azp-template-addon.yml
|
||||
parameters:
|
||||
addon: "mariadb"
|
||||
arch: "--all"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "1.3",
|
||||
"slug": "mariadb",
|
||||
"description": "An SQL database server",
|
||||
"url": "https://home-assistant.io/addons/mariadb/",
|
||||
"url": "https://github.com/home-assistant/hassio-addons/tree/master/mariadb",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
"startup": "system",
|
||||
"boot": "auto",
|
||||
@@ -12,20 +12,21 @@
|
||||
},
|
||||
"options": {
|
||||
"databases": ["homeassistant"],
|
||||
"logins": [
|
||||
{"username": "hass", "host": "%", "password": null}
|
||||
],
|
||||
"logins": [{ "username": "hass", "host": "%", "password": null }],
|
||||
"rights": [
|
||||
{"username": "hass", "host": "%", "database": "homeassistant", "grant": "ALL PRIVILEGES ON"}
|
||||
{
|
||||
"username": "hass",
|
||||
"host": "%",
|
||||
"database": "homeassistant",
|
||||
"grant": "ALL PRIVILEGES ON"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"databases": ["str"],
|
||||
"logins": [
|
||||
{"username": "str", "host": "str", "password": "str"}
|
||||
],
|
||||
"logins": [{ "username": "str", "host": "str", "password": "str" }],
|
||||
"rights": [
|
||||
{"username": "str", "host": "str", "database": "str", "grant": "str"}
|
||||
{ "username": "str", "host": "str", "database": "str", "grant": "str" }
|
||||
]
|
||||
},
|
||||
"image": "homeassistant/{arch}-addon-mariadb",
|
||||
|
||||
Reference in New Issue
Block a user