salah bouabid
salah bouabid

Reputation: 1

Cannot access the web UI of zabbix server that I set using docker-compose

version: '3'
services:
  db:
    image: mysql:8.0-oracle
    volumes:
    - zabbix-db:/var/lib/mysql
    restart: always
    container_name: mysql
    environment:
      MYSQL_DATABASE: "zabbix"
      MYSQL_USER: "zabbix"
      MYSQL_PASSWORD: "zabbix_pwd"
      MYSQL_ROOT_PASSWORD: "root_pwd"

  zabbix-java:
    image: zabbix/zabbix-java-gateway:alpine-7.2-latest
    container_name: zabbix-java
    restart: always
    depends_on:
    - db

  zabbix-server-mysql:
    image: zabbix/zabbix-server-mysql:alpine-7.2-latest
    container_name: zabbix-server-mysql
    environment:
      MYSQL_DATABASE: "zabbix"
      MYSQL_USER: "zabbix"
      MYSQL_PASSWORD: "zabbix_pwd"
      MYSQL_ROOT_PASSWORD: "root_pwd"
      ZBX_JAVAGATEWAY: "zabbix-java"
    ports:
    - "10051:10051"
    restart: unless-stopped
    depends_on:
    - db
    - zabbix-java

  web:
    image: zabbix/zabbix-web-nginx-mysql:alpine-7.2-latest
    environment:
      ZBX_SERVER_HOST: "zabbix-server-mysql"
      DB_SERVER_HOST: "mysql"
      MYSQL_DATABASE: "zabbix"
      MYSQL_USER: "zabbix"
      MYSQL_PASSWORD: "zabbix_pwd"
      MYSQL_ROOT_PASSWORD: "root_pwd"
    ports:
    - "80:8080"
    restart: always
    depends_on:
    - zabbix-server-mysql

volumes:
  zabbix-db: {}

This is the docker compose I set, is there something wrong with it?

When I do compose up, everything is fine, but no access from the web though.

Upvotes: 0

Views: 27

Answers (0)

Related Questions