services: zabbix-server: image: ${ZABBIX_SERVER_IMAGE:-zabbix/zabbix-server-pgsql:ubuntu-7.2.1} container_name: server restart: unless-stopped ports: - 10051:10051 environment: DB_SERVER_HOST: postgres DB_SERVER_PORT: 5432 POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} depends_on: - postgres networks: - network-zabbix zabbix-frontend: image: ${ZABBIX_FRONTEND_IMAGE:-zabbix/zabbix-web-nginx-pgsql:ubuntu-7.2.1} restart: unless-stopped container_name: frontend ports: - 8080:8080 - 8443:8443 environment: DB_SERVER_HOST: postgres POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} PHP_TZ: ${TZ} ZBX_SERVER_HOST: zabbix-server ZBX_SERVER_PORT: 10051 depends_on: - zabbix-server networks: - network-zabbix zabbix-agent: image: ${ZABBIX_AGENT_IMAGE:-zabbix/zabbix-agent:ubuntu-7.2.1} container_name: zabbix-agent restart: unless-stopped ports: - 10050:10050 environment: ZBX_ACTIVE_ALLOW: false TZ: ${TZ} ZBX_SERVER_HOST: zabbix-server ZBX_SERVER_PORT: 10051 ZBX_HOSTNAME: zabbix-agent ZBX_HOSTNAMEITEM: system.hostname depends_on: - zabbix-server networks: - network-zabbix postgres: image: ${POSTGRES_IMAGE:-postgres:latest} # command: -c ssl=on -c ssl_cert_file=/run/secrets/server-cert.pem -c ssl_key_file=/run/secrets/server-key.pem -c ssl_ca_file=/run/secrets/root-ca.pem container_name: postgres restart: unless-stopped ports: - 5432:5432 volumes: - postgres:/var/lib/postgresql/data # - pgsql_socket:/var/run/postgresql/ environment: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_DB: ${POSTGRES_DB} PG_DATA: /var/lib/postgresql/data/pgdata networks: - network-zabbix grafana: image: ${GRAFANA_IMAGE:-grafana/grafana} container_name: grafana restart: unless-stopped ports: - 3000:3000 environment: GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin} GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_SECRET:-12345} GF_INSTALL_PLUGINS: alexanderzobnin-zabbix-app TZ: ${TZ} user: "472" volumes: - grafana:/var/lib/grafana - ./grafana/grafana.ini:/etc/grafana/grafana.ini - ./grafana/provisioning:/etc/grafana/provisioning depends_on: - zabbix-frontend networks: - network-zabbix volumes: postgres: {} grafana: {} networks: network-zabbix: driver: bridge