---

apiVersion: v1
kind: Pod
metadata:
  name: zabbix
spec:
  containers:
    - image: docker.io/zabbix/zabbix-web-nginx-pgsql:5.0-alpine-latest
      name: zabbix-web-nginx
      env:
        - name: DB_SERVER_HOST
          value: 127.0.0.1
        - name: PHP_TZ
          value: Europe/Oslo
        - name: POSTGRES_DB
          value: zabbix
        - name: POSTGRES_PASSWORD
          value: ${ZABBIX_PASSWORD}
        - name: POSTGRES_USER
          value: zabbix
        - name: ZBX_SERVER_HOST
          value: 127.0.0.1
      ports:
        - containerPort: 8080
          hostPort: 8080
          protocol: TCP
    - image: docker.io/library/postgres:latest
      name: postgres
      env:
        - name: POSTGRES_DB
          value: zabbix
        - name: POSTGRES_PASSWORD
          value: ${ZABBIX_PASSWORD}
        - name: POSTGRES_USER
          value: zabbix
      ports:
        - containerPort: 5432
          hostPort: 5432
          protocol: TCP
    - image: docker.io/zabbix/zabbix-server-pgsql:5.0-alpine-latest
      name: zabbix-server
      env:
        - name: DB_SERVER_HOST
          value: 127.0.0.1
        - name: POSTGRES_DB
          value: zabbix
        - name: POSTGRES_PASSWORD
          value: ${ZABBIX_PASSWORD}
        - name: POSTGRES_USER
          value: zabbix
  restartPolicy: Never
