update some informations after create full stack

This commit is contained in:
2025-02-02 19:30:34 +01:00
parent 09e50c5e36
commit 6ad0ed98d2
5 changed files with 39 additions and 47 deletions

View File

@@ -1,21 +1,29 @@
# Docker IcingaWeb2
[![Build Status](https://git.ao-it.net/docker/icingaweb2/actions/workflows/docker-build.yml/badge.svg?branch=main&event=push)](https://git.ao-it.net/docker/icingaweb2/actions?workflow=docker-build.yml&actor=0&status=0)
Designed with [https://git.ao-it.net/docker/icinga2](https://git.ao-it.net/docker/icinga2)
If you need a full stack:
* [AO-IT: icinga-stack](https://git.ao-it.net/docker/icinga-stack)
* [AO-IT: icinga2](https://git.ao-it.net/docker/icinga2)
## quick start
Or a additional satellite:
* [AO-IT: icinga-satellite](https://git.ao-it.net/docker/icinga-satellite)
## usage
If you have a functional icinga2 instance only without icingaweb2:
```bash
git clone https://git.ao-it.net/docker/icingaweb2
cd icingaweb2
cp env.sample .env
nano .env # edit your settings
# must edit: GRAFANA_HOST with local IP or FQDN
nano .env # edit your env
docker compose up -d
```
For a full deployment see: [comming soon ...]()
If you run the setup without any environment vars the setup token will be printet in docker log!
Hints:
* If you run the setup without any environment vars the setup token will be printet in docker log!
* If you deploy IcingaDB ENV but it can't be reach, icingaweb looks like broken but it isn't
* You can remove the environment var `ICINGAWEB2_CONF_ONCE` whan will changes in `compose.yml` environment deploy every time if the container starts.
* You can use this for future config changes, but this isn't good tested and i am not sure i will recommend this...
## understand environment
For the configuration (primarily the initial setup) I use a similar method as: https://hub.docker.com/r/icinga/icingaweb2
@@ -77,7 +85,7 @@ Vars for the container have the `2`
## example
See [compose.yml](compose.yml).
This is for environment priview
This is for environment priview (minimal setup)
```yaml
services:
icingaweb2:
@@ -96,13 +104,6 @@ services:
- ICINGAWEB2_RESOURCES__${ICINGAWEB_DB_RESOURCE_NAME:-icingaweb_db}__username=${ICINGAWEB_DB_USER:-icingaweb}
- ICINGAWEB2_RESOURCES__${ICINGAWEB_DB_RESOURCE_NAME:-icingaweb_db}__password=${ICINGAWEB_DB_PASS:-icingaweb}
- ICINGAWEB2_RESOURCES__${ICINGAWEB_DB_RESOURCE_NAME:-icingaweb_db}__charset=utf8mb4
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__type=db
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__db=mysql
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__host=${ICINGA_DB_HOST:-db_icinga}
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__dbname=${ICINGA_DB:-icingadb}
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__username=${ICINGA_DB_USER:-icingadb}
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__password=${ICINGA_DB_PASS:-icingadb}
- ICINGAWEB2_RESOURCES__${ICINGAWDB_RESOURCE_NAME:-icingadb}__charset=utf8mb4
- ICINGAWEB2_AUTH__icingaweb2__backend=db
- ICINGAWEB2_AUTH__icingaweb2__resource=${ICINGAWEB_DB_RESOURCE_NAME:-icingaweb_db}
- ICINGAWEB2_GROUPS__icingaweb2__backend=db
@@ -110,14 +111,6 @@ services:
- ICINGAWEB2_ROLES__${ICINGAWEB_DEFAULT_ADMIN_ROLE:-Administrators}__groups=${ICINGAWEB_DEFAULT_ADMIN_ROLE:-Administrators}
- ICINGAWEB2_ROLES__${ICINGAWEB_DEFAULT_ADMIN_ROLE:-Administrators}__permissions="*"
- ICINGAWEB2_ROLES__${ICINGAWEB_DEFAULT_ADMIN_ROLE:-Administrators}__users=${ICINGAWEB_DEFAULT_ADMIN_USER:-icingaadmin}
- ICINGAWEB2_ICINGADB_CONF__icingadb__resource=icingadb
- ICINGAWEB2_ICINGADB_REDIS__redis1__host=redis
- ICINGAWEB2_ICINGADB_REDIS__redis1__port=6379
- ICINGAWEB2_ICINGADB_CMD__icinga2__transport=api
- ICINGAWEB2_ICINGADB_CMD__icinga2__host=icinga2
- ICINGAWEB2_ICINGADB_CMD__icinga2__port=5665
- ICINGAWEB2_ICINGADB_CMD__icinga2__username=icingaweb
- ICINGAWEB2_ICINGADB_CMD__icinga2__password=icingaweb
- ICINGAWEB2_DB_RESOURCE_NAME=${ICINGAWEB_DB_RESOURCE_NAME:-icingaweb_db}
- ICINGAWEB2_DEFAULT_ADMIN_USER=${ICINGAWEB_DEFAULT_ADMIN_USER:-icingaadmin}
- ICINGAWEB2_DEFAULT_ADMIN_PASS=${ICINGAWEB_DEFAULT_ADMIN_PASS:-icingaadmin}
@@ -133,11 +126,6 @@ services:
- ICINGAWEB2_GRAFANA_GRAPH__check_command__panelId=
```
You can remove the environment var `ICINGAWEB2_CONF_ONCE` whan will changes in `compose.yml` environment deploy every time if the container starts.
You can use this for future config changes, but this isn't tested and i am not sure i will recommend this...
For now be save and use it only for inital setup.
## Sources
### Icingaweb2
* [Install Icinga Web 2](https://icinga.com/docs/icinga-web/latest/doc/02-Installation/01-Debian/)