mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-23 08:13:32 +01:00
261 lines
7.4 KiB
YAML
261 lines
7.4 KiB
YAML
version: '3.8'
|
|
services:
|
|
zabbix-build-base:
|
|
build:
|
|
context: ./Dockerfiles/build-base/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
image: ${BUILD_BASE_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
|
|
zabbix-build-pgsql:
|
|
build:
|
|
context: ./Dockerfiles/build-pgsql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-base
|
|
|
|
zabbix-build-mysql:
|
|
build:
|
|
context: ./Dockerfiles/build-mysql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
profiles:
|
|
- all
|
|
depends_on:
|
|
- zabbix-build-base
|
|
|
|
zabbix-build-sqlite3:
|
|
build:
|
|
context: ./Dockerfiles/build-sqlite3/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
profiles:
|
|
- all
|
|
depends_on:
|
|
- zabbix-build-base
|
|
|
|
zabbix-server:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-server-pgsql
|
|
build:
|
|
context: ./Dockerfiles/server-pgsql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-server-pgsql:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- postgres-server
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-proxy-sqlite3:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-proxy-sqlite3
|
|
build:
|
|
context: ./Dockerfiles/proxy-sqlite3/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-proxy-sqlite3:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-sqlite3
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-proxy-mysql:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-proxy-mysql
|
|
build:
|
|
context: ./Dockerfiles/proxy-mysql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-proxy-mysql:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- mysql-server
|
|
- zabbix-build-mysql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-web-apache-pgsql:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-web-apache-pgsql
|
|
build:
|
|
context: ./Dockerfiles/web-apache-pgsql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-web-apache-pgsql:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- postgres-server
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-web-nginx-pgsql:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-web-nginx-pgsql
|
|
build:
|
|
context: ./Dockerfiles/web-nginx-pgsql/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_PGSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-web-nginx-pgsql:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- postgres-server
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-agent:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-agent
|
|
build:
|
|
context: ./Dockerfiles/agent/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-agent:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-java-gateway:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-java-gateway
|
|
build:
|
|
context: ./Dockerfiles/java-gateway/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-java-gateway:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-snmptraps:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-snmptraps
|
|
build:
|
|
context: ./Dockerfiles/snmptraps/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
image: zabbix-snmptraps:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
zabbix-web-service:
|
|
extends:
|
|
file: compose_zabbix_components.yaml
|
|
service: zabbix-web-service
|
|
build:
|
|
context: ./Dockerfiles/web-service/${UBUNTU_OS_TAG_SHORT}
|
|
cache_from:
|
|
- "${UBUNTU_CACHE_FROM}"
|
|
args:
|
|
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
image: zabbix-web-service:${ZABBIX_UBUNTU_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
|
|
depends_on:
|
|
- zabbix-build-pgsql
|
|
labels:
|
|
com.zabbix.os: "${UBUNTU_OS_TAG}"
|
|
|
|
mysql-server:
|
|
extends:
|
|
file: compose_databases.yaml
|
|
service: mysql-server
|
|
|
|
postgres-server:
|
|
extends:
|
|
file: compose_databases.yaml
|
|
service: postgres-server
|
|
|
|
db-data-mysql:
|
|
extends:
|
|
file: compose_databases.yaml
|
|
service: db-data-mysql
|
|
|
|
db-data-pgsql:
|
|
extends:
|
|
file: compose_databases.yaml
|
|
service: db-data-pgsql
|
|
|
|
# elasticsearch:
|
|
# extends:
|
|
# file: compose_databases.yaml
|
|
# service: elasticsearch
|
|
|
|
networks:
|
|
zbx_net_frontend:
|
|
driver: bridge
|
|
driver_opts:
|
|
com.docker.network.enable_ipv6: "${FRONTEND_ENABLE_IPV6}"
|
|
ipam:
|
|
driver: "${FRONTEND_NETWORK_DRIVER}"
|
|
config:
|
|
- subnet: "${FRONTEND_SUBNET}"
|
|
zbx_net_backend:
|
|
driver: bridge
|
|
driver_opts:
|
|
com.docker.network.enable_ipv6: "${BACKEND_ENABLE_IPV6}"
|
|
internal: true
|
|
ipam:
|
|
driver: "${BACKEND_NETWORK_DRIVER}"
|
|
config:
|
|
- subnet: "${BACKEND_SUBNET}"
|
|
zbx_net_database:
|
|
driver: bridge
|
|
driver_opts:
|
|
com.docker.network.enable_ipv6: "${DATABASE_NETWORK_ENABLE_IPV6}"
|
|
internal: true
|
|
ipam:
|
|
driver: "${DATABASE_NETWORK_DRIVER}"
|
|
|
|
volumes:
|
|
snmptraps:
|
|
# dbsocket:
|
|
|
|
secrets:
|
|
MYSQL_USER:
|
|
file: ${ENV_VARS_DIRECTORY}/.MYSQL_USER
|
|
MYSQL_PASSWORD:
|
|
file: ${ENV_VARS_DIRECTORY}/.MYSQL_PASSWORD
|
|
MYSQL_ROOT_USER:
|
|
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_USER
|
|
MYSQL_ROOT_PASSWORD:
|
|
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_PASSWORD
|
|
POSTGRES_USER:
|
|
file: ${ENV_VARS_DIRECTORY}/.POSTGRES_USER
|
|
POSTGRES_PASSWORD:
|
|
file: ${ENV_VARS_DIRECTORY}/.POSTGRES_PASSWORD
|