Add Zabbix CI/CD with PostgreSQL backup
Zabbix CI/CD / Deploy Zabbix (push) Failing after 2s

This commit is contained in:
root
2026-09-30 11:11:35 +03:00
parent c8e9370d51
commit bcd8bf7e3f
3 changed files with 1318 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
name: Zabbix CI/CD
on:
push:
paths:
- "stacks/zabbix/**"
- "scripts/deploy-zabbix.sh"
- ".gitea/workflows/zabbix.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
zabbix:
name: Deploy Zabbix
runs-on: docker-home-01
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Deploy Zabbix
if: ${{ gitea.ref == 'refs/heads/main' }}
run: |
./scripts/deploy-zabbix.sh
+1212
View File
File diff suppressed because it is too large Load Diff
+72
View File
@@ -0,0 +1,72 @@
services:
zabbix-server:
image: zabbix/zabbix-server-pgsql:alpine-7.4.14
container_name: zabbix-server-pgsql
restart: unless-stopped
env_file:
- /srv/nfs/infra/zabbix/.env
environment:
ZBX_TIMEOUT: 10
ZBX_STARTPOLLERS: 10
ZBX_STARTPOLLERSUNREACHABLE: 5
ZBX_STARTPINGERS: 3
ZBX_STARTDISCOVERERS: 2
ZBX_STARTHTTPPOLLERS: 3
ZBX_STARTIPMIPOLLERS: 3
ZBX_CACHESIZE: 64M
ZBX_HISTORYCACHESIZE: 64M
ZBX_HISTORYINDEXCACHESIZE: 32M
ZBX_VALUECACHESIZE: 64M
cap_add:
- NET_RAW
ports:
- "10051:10051"
volumes:
- /etc/localtime:/etc/localtime:ro
- zbx_alertscripts:/usr/lib/zabbix/alertscripts:rw
- zbx_externalscripts:/usr/lib/zabbix/externalscripts:rw
- zbx_export:/var/lib/zabbix/export:rw
networks:
- zbx_backend
zabbix-web:
image: zabbix/zabbix-web-nginx-pgsql:alpine-7.4.14
container_name: zabbix-web-nginx-pgsql
restart: unless-stopped
env_file:
- /srv/nfs/infra/zabbix/.env
environment:
ZBX_SERVER_HOST: zabbix-server-pgsql
ZBX_SERVER_PORT: 10051
expose:
- "8080"
volumes:
- /etc/localtime:/etc/localtime:ro
depends_on:
- zabbix-server
healthcheck:
test:
- CMD
- curl
- -f
- http://localhost:8080/ping
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
networks:
- zbx_backend
- interdock
volumes:
zbx_alertscripts:
zbx_externalscripts:
zbx_export:
networks:
zbx_backend:
name: zbx_backend
interdock:
external: true