Add
This commit is contained in:
80
docker-compose.yml
Normal file
80
docker-compose.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
services:
|
||||
postgres-server:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: zabbix
|
||||
POSTGRES_USER: zabbix
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
command: postgres -c fsync=off -c full_page_writes=off -c wal_buffers=-1 -c shared_buffers=256MB -c max_connections=100
|
||||
networks:
|
||||
- zabbix-net
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data:Z
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U zabbix -d zabbix"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
zabbix-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DB_SERVER_HOST: postgres-server
|
||||
POSTGRES_DB: zabbix
|
||||
POSTGRES_USER: zabbix
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
ZBX_TELEGRAM_TG_TOKEN: ${ZBX_TELEGRAM_TG_TOKEN}
|
||||
ZBX_TELEGRAM_API_URL: ${ZBX_TELEGRAM_API_URL}
|
||||
ZBX_TELEGRAM_API_LOGIN: ${ZBX_TELEGRAM_API_LOGIN}
|
||||
ZBX_TELEGRAM_API_PASS: ${ZBX_TELEGRAM_API_PASS}
|
||||
ZBX_TELEGRAM_PROXY: ${ZBX_TELEGRAM_PROXY}
|
||||
ZBX_TELEGRAM_PROXY_SCHEME: ${ZBX_TELEGRAM_PROXY_SCHEME}
|
||||
ZBX_TELEGRAM_PROXY_URL: ${ZBX_TELEGRAM_PROXY_URL}
|
||||
ZBX_TELEGRAM_THREAD: ${ZBX_TELEGRAM_THREAD}
|
||||
networks:
|
||||
- zabbix-net
|
||||
depends_on:
|
||||
postgres-server:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "45017:10051"
|
||||
volumes:
|
||||
- zabbix-data:/var/lib/zabbix
|
||||
# - ./zbxTelegram_config.py:/usr/lib/zabbix/alertscripts/zbxTelegram_config.py
|
||||
# - telegram_cache:/usr/lib/zabbix/alertscripts/zbxTelegram_files
|
||||
- ./alertscripts:/usr/lib/zabbix/alertscripts
|
||||
|
||||
zabbix-web:
|
||||
image: zabbix/zabbix-web-nginx-pgsql:alpine-latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DB_SERVER_HOST: postgres-server
|
||||
POSTGRES_DB: zabbix
|
||||
POSTGRES_USER: zabbix
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
ZBX_SERVER_HOST: zabbix-server
|
||||
PHP_TZ: Europe/Helsinki
|
||||
networks:
|
||||
- zabbix-net
|
||||
ports:
|
||||
- "45016:8080"
|
||||
depends_on:
|
||||
postgres-server:
|
||||
condition: service_healthy
|
||||
zabbix-server:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
driver: local
|
||||
zabbix-data:
|
||||
driver: local
|
||||
telegram_cache:
|
||||
driver: local
|
||||
networks:
|
||||
zabbix-net:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user