zabbix-docker/docker-compose_v3_alpine_mysql_local.yaml

269 lines
7.5 KiB
YAML
Raw Normal View History

2023-12-13 11:42:04 +01:00
version: '3.8'
2018-02-20 15:22:27 +01:00
services:
zabbix-build-base:
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/build-base/${ALPINE_OS_TAG_SHORT}
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
image: ${BUILD_BASE_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
zabbix-build-mysql:
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/build-mysql/${ALPINE_OS_TAG_SHORT}
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-base
zabbix-build-sqlite3:
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/build-sqlite3/${ALPINE_OS_TAG_SHORT}
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2021-10-16 23:15:15 +02:00
profiles:
- all
depends_on:
- zabbix-build-base
2018-02-20 15:22:27 +01:00
zabbix-server:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: server-mysql
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/server-mysql/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-server-mysql:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
2023-12-13 11:42:04 +01:00
- /etc/timezone:/etc/timezone:ro
2018-02-20 15:22:27 +01:00
depends_on:
- mysql-server
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-proxy-sqlite3:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: proxy-sqlite3
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/proxy-sqlite3/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_SQLITE3_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-proxy-sqlite3:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
2023-12-13 11:42:04 +01:00
- /etc/timezone:/etc/timezone:ro
2018-02-20 15:22:27 +01:00
depends_on:
- zabbix-build-sqlite3
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-proxy-mysql:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: proxy-mysql
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/proxy-mysql/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-proxy-mysql:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-web-apache-mysql:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: web-apache-mysql
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/web-apache-mysql/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-apache-mysql:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-web-nginx-mysql:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: web-nginx-mysql
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/web-nginx-mysql/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-nginx-mysql:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- mysql-server
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-agent:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: agent
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/agent/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-agent:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2018-02-20 15:22:27 +01:00
volumes:
- /etc/timezone:/etc/timezone:ro
depends_on:
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-java-gateway:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: java-gateway
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/java-gateway/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-java-gateway:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
zabbix-snmptraps:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: snmptraps
2018-02-20 15:22:27 +01:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/snmptraps/${ALPINE_OS_TAG_SHORT}
2018-02-20 15:22:27 +01:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
image: zabbix-snmptraps:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
2023-12-14 10:15:17 +01:00
depends_on:
- zabbix-build-mysql
2018-02-20 15:22:27 +01:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2018-02-20 15:22:27 +01:00
2021-04-27 23:10:15 +02:00
zabbix-web-service:
2023-12-14 10:15:17 +01:00
extends:
file: compose_zabbix_components.yaml
2024-02-06 09:16:51 +01:00
service: web-service
2021-04-27 23:10:15 +02:00
build:
2023-12-13 11:42:04 +01:00
context: ./Dockerfiles/web-service/${ALPINE_OS_TAG_SHORT}
2021-04-27 23:10:15 +02:00
cache_from:
2023-12-13 11:42:04 +01:00
- "${ALPINE_CACHE_FROM}"
args:
2023-12-13 11:42:04 +01:00
BUILD_BASE_IMAGE: ${BUILD_BASE_MYSQL_IMAGE}:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
image: zabbix-web-service:${ZABBIX_ALPINE_IMAGE_TAG}${ZABBIX_LOCAL_IMAGE_TAG_POSTFIX}
depends_on:
- zabbix-build-mysql
2021-04-27 23:10:15 +02:00
labels:
2023-12-13 11:42:04 +01:00
com.zabbix.os: "${ALPINE_OS_TAG}"
2021-04-27 23:10:15 +02:00
2018-02-20 15:22:27 +01:00
mysql-server:
2023-12-14 10:15:17 +01:00
extends:
file: compose_databases.yaml
service: mysql-server
2018-02-20 15:22:27 +01:00
2023-12-14 10:15:17 +01:00
db-data-mysql:
extends:
file: compose_databases.yaml
service: db-data-mysql
2018-02-20 15:22:27 +01:00
2018-06-01 11:02:20 +02:00
# elasticsearch:
2023-12-14 10:15:17 +01:00
# extends:
# file: compose_databases.yaml
# service: elasticsearch
2018-06-01 11:02:20 +02:00
# selenium:
# extends:
# file: compose_additional_components.yaml
# service: selenium
2018-02-20 15:22:27 +01:00
networks:
zbx_net_frontend:
driver: bridge
driver_opts:
2023-12-13 11:42:04 +01:00
com.docker.network.enable_ipv6: "${FRONTEND_ENABLE_IPV6}"
2018-02-20 15:22:27 +01:00
ipam:
2023-12-13 11:42:04 +01:00
driver: "${FRONTEND_NETWORK_DRIVER}"
2018-02-20 15:22:27 +01:00
config:
2023-12-13 11:42:04 +01:00
- subnet: "${FRONTEND_SUBNET}"
2018-02-20 15:22:27 +01:00
zbx_net_backend:
driver: bridge
driver_opts:
2023-12-13 11:42:04 +01:00
com.docker.network.enable_ipv6: "${BACKEND_ENABLE_IPV6}"
2018-02-20 15:22:27 +01:00
internal: true
ipam:
2023-12-13 11:42:04 +01:00
driver: "${BACKEND_NETWORK_DRIVER}"
2018-02-20 15:22:27 +01:00
config:
2023-12-13 11:42:04 +01:00
- subnet: "${BACKEND_SUBNET}"
2023-12-14 10:15:17 +01:00
zbx_net_database:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${DATABASE_NETWORK_ENABLE_IPV6}"
internal: true
ipam:
driver: "${DATABASE_NETWORK_DRIVER}"
zbx_tools_frontend:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "${ADD_TOOLS_ENABLE_IPV6}"
ipam:
driver: "${ADD_TOOLS_NETWORK_DRIVER}"
config:
- subnet: "${ADD_TOOLS_SUBNET}"
2019-07-13 23:50:22 +02:00
2020-06-28 20:43:34 +02:00
volumes:
snmptraps:
2023-05-02 08:33:33 +02:00
# dbsocket:
2020-06-28 20:43:34 +02:00
2019-07-13 23:50:22 +02:00
secrets:
MYSQL_USER:
2023-12-13 11:42:04 +01:00
file: ${ENV_VARS_DIRECTORY}/.MYSQL_USER
2019-07-13 23:50:22 +02:00
MYSQL_PASSWORD:
2023-12-13 11:42:04 +01:00
file: ${ENV_VARS_DIRECTORY}/.MYSQL_PASSWORD
MYSQL_ROOT_USER:
2023-12-13 11:42:04 +01:00
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_USER
2019-07-13 23:50:22 +02:00
MYSQL_ROOT_PASSWORD:
2023-12-13 11:42:04 +01:00
file: ${ENV_VARS_DIRECTORY}/.MYSQL_ROOT_PASSWORD
2020-04-28 16:21:46 +02:00
# client-key.pem:
2023-12-13 11:42:04 +01:00
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_KEY_FILE
2020-04-28 16:21:46 +02:00
# client-cert.pem:
2023-12-13 11:42:04 +01:00
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_CERT_FILE
2020-04-28 16:21:46 +02:00
# root-ca.pem:
2023-12-13 11:42:04 +01:00
# file: ${ENV_VARS_DIRECTORY}/.ZBX_DB_CA_FILE
2020-04-28 16:21:46 +02:00
# server-cert.pem:
2023-12-13 11:42:04 +01:00
# file: ${ENV_VARS_DIRECTORY}/.DB_CERT_FILE
2020-04-28 16:21:46 +02:00
# server-key.pem:
2023-12-13 11:42:04 +01:00
# file: ${ENV_VARS_DIRECTORY}/.DB_KEY_FILE