zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.39k stars 1.38k forks source link

The frontend does not match Zabbix database. Docker postgresql version #146

Closed WorldException closed 7 years ago

WorldException commented 7 years ago

I use docker for deploy zabbix from https://hub.docker.com/r/zabbix/zabbix-web-apache-pgsql/

But I get error on http://localhost:9991/

Database error The frontend does not match Zabbix database.

You can check this with docker-compose.yml

version: '2'
services:
  #https://hub.docker.com/r/zabbix/zabbix-web-apache-pgsql/
  zabix:
    image: zabbix/zabbix-web-apache-pgsql:latest
    environment:
      - ZBX_SERVER_HOST=zabbix
      - ZBX_SERVER_PORT=80
      - DB_SERVER_HOST=postgres
      - POSTGRES_USER=zabbix
      - POSTGRES_PASSWORD=zabbix
      - POSTGRES_DB=zabbix
      - PHP_TZ="Europe/Moscow"
      - DB_SERVER_ROOT_USER=zabbix
      - DB_SERVER_ROOT_PASS=zabbix
      - DB_SERVER_ZBX_USER=zabbix
      - DB_SERVER_ZBX_PASS=zabbix
    links:
      - db:postgres
    depends_on: 
      - db
    ports:
      - 9991:80
  db:
    image: postgres:9.6.5-alpine
    environment:
      - POSTGRES_PASSWORD=zabbix
      - POSTGRES_USER=zabbix
      - POSTGRES_DB=zabbix
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data:
WorldException commented 7 years ago

This is my mistake. This working.

docker-compose.yml

version: '2'
services:
  #https://hub.docker.com/r/zabbix/zabbix-web-apache-pgsql/
  zabix-web:
    image: zabbix/zabbix-web-apache-pgsql:latest
    environment:
      - ZBX_SERVER_HOST=zabbix
      - DB_SERVER_HOST=postgres
      - DB_SERVER_DBNAME=zabbix
      - POSTGRES_USER=zabbix
      - POSTGRES_PASSWORD=zabbix
      - POSTGRES_DB=zabbix
      - PHP_TZ="Europe/Moscow"
    links:
      - db:postgres
      - zabbix:zabbix
    depends_on: 
      - db
      - zabbix
    ports:
      - 9991:80
  zabbix:
    image: zabbix/zabbix-server-pgsql:latest
    environment:
      - ZBX_SERVER_HOST=zabbix
      - DB_SERVER_HOST=postgres
      - DB_SERVER_DBNAME=zabbix
      - POSTGRES_USER=zabbix
      - POSTGRES_PASSWORD=zabbix
      - POSTGRES_DB=zabbix
    links:
      - db:postgres
    depends_on: 
      - db
  db:
    image: postgres:9.6.5-alpine
    environment:
      - POSTGRES_PASSWORD=zabbix
      - POSTGRES_USER=zabbix
      - POSTGRES_DB=zabbix
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data: