Created
January 29, 2017 21:12
-
-
Save psi-4ward/c247863b52104a8c993649896065bd49 to your computer and use it in GitHub Desktop.
Icinga2 Docker-Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
mysql: | |
image: mariadb | |
restart: unless-stopped | |
environment: | |
MYSQL_ROOT_PASSWORD: ${MYSQL_PASS} | |
volumes: | |
- "./mysql:/var/lib/mysql" | |
icinga2: | |
image: psitrax/icinga2 | |
hostname: icinga2 # for API Certs | |
restart: unless-stopped | |
depends_on: | |
- mysql | |
environment: | |
TIMEZONE: ${TIMEZONE} | |
MYSQL_HOST: ${MYSQL_HOST} | |
MYSQL_PORT: ${MYSQL_PORT} | |
MYSQL_USER: ${MYSQL_USER} | |
MYSQL_PASS: ${MYSQL_PASS} | |
MYSQL_DB: ${MYSQL_DB} | |
MYSQL_AUTOCONF: ${MYSQL_AUTOCONF} | |
ICINGA_API_PASS: ${ICINGA_API_PASS} | |
ICINGA_LOGLEVEL: ${ICINGA_LOGLEVEL} | |
ICINGA_FEATURES: ${ICINGA_FEATURES} | |
volumes: | |
- "./icinga2:/icinga2" | |
icingaweb2: | |
image: psitrax/icingaweb2 | |
restart: unless-stopped | |
depends_on: | |
- mysql | |
- icinga2 | |
environment: | |
TIMEZONE: ${TIMEZONE} | |
MYSQL_AUTOCONF: ${MYSQL_AUTOCONF} | |
IDO_DB_HOST: ${MYSQL_HOST} | |
IDO_DB_PORT: ${MYSQL_PORT} | |
IDO_DB_USER: ${MYSQL_USER} | |
IDO_DB_PASS: ${MYSQL_PASS} | |
IDO_DB: ${MYSQL_DB} | |
WEB_DB_HOST: ${MYSQL_HOST} | |
WEB_DB_PORT: ${MYSQL_PORT} | |
WEB_DB_USER: ${MYSQL_USER} | |
WEB_DB_PASS: ${MYSQL_PASS} | |
WEB_DB: ${WEB_DB} | |
ICINGA_API_PASS: ${ICINGA_API_PASS} | |
ports: | |
- "8080:80" | |
volumes: | |
- "./icingaweb2:/etc/icingaweb2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requiring
hostname: icinga2
can cause problems when trying to send mail: mail is often rejected if it's sent from a hostname that doesn't correspond to the host's IP. It would be much nicer if an arbitrary hostname could be used.