mirror of
https://github.com/okxlin/appstore.git
synced 2025-07-13 21:02:18 +08:00
feat:添加zabbix-postgresql版本
This commit is contained in:
parent
2ffdf37a39
commit
ca3deefe77
8
apps/zabbix-server/6.4.13-postgres/.env.sample
Normal file
8
apps/zabbix-server/6.4.13-postgres/.env.sample
Normal file
@ -0,0 +1,8 @@
|
||||
CONTAINER_NAME="zabbix-server"
|
||||
PANEL_APP_PORT_COMM="10051"
|
||||
PANEL_APP_PORT_HTTP="40047"
|
||||
PANEL_APP_PORT_SNMP="1162"
|
||||
PANEL_DB_HOST="127.0.0.1"
|
||||
PANEL_DB_NAME="zabbix"
|
||||
PANEL_DB_USER="zabbix"
|
||||
PANEL_DB_USER_PASSWORD="MyDBPWD_brls9UwcRasl"
|
58
apps/zabbix-server/6.4.13-postgres/data.yml
Normal file
58
apps/zabbix-server/6.4.13-postgres/data.yml
Normal file
@ -0,0 +1,58 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: PANEL_DB_HOST
|
||||
key: postgresql
|
||||
labelEn: Database Service
|
||||
labelZh: 数据库服务
|
||||
required: true
|
||||
type: service
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_NAME
|
||||
labelEn: Database
|
||||
labelZh: 数据库名
|
||||
random: true
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_USER
|
||||
labelEn: User
|
||||
labelZh: 数据库用户
|
||||
random: true
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_USER_PASSWORD
|
||||
labelEn: Password
|
||||
labelZh: 数据库用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: 10051
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_COMM
|
||||
labelEn: Gateway port
|
||||
labelZh: 网关端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 40047
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 1162
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_SNMP
|
||||
labelEn: Snmptraps Port
|
||||
labelZh: Snmptraps 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
0
apps/zabbix-server/6.4.13-postgres/data/.gitkeep
Normal file
0
apps/zabbix-server/6.4.13-postgres/data/.gitkeep
Normal file
56
apps/zabbix-server/6.4.13-postgres/docker-compose.yml
Normal file
56
apps/zabbix-server/6.4.13-postgres/docker-compose.yml
Normal file
@ -0,0 +1,56 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
zabbix-snmptraps:
|
||||
container_name: ${CONTAINER_NAME}-snmptraps
|
||||
image: zabbix/zabbix-snmptraps:alpine-6.4.13
|
||||
volumes:
|
||||
- ./data/snmptraps:/var/lib/zabbix/snmptraps:rw
|
||||
- ./data/mibs:/usr/share/snmp/mibs:ro
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_SNMP}:1162/udp"
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
zabbix-server-pgsql:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
image: zabbix/zabbix-server-pgsql:alpine-6.4.13
|
||||
environment:
|
||||
- DB_SERVER_HOST=${PANEL_DB_HOST}
|
||||
- POSTGRES_USER=${PANEL_DB_USER}
|
||||
- POSTGRES_PASSWORD=${PANEL_DB_USER_PASSWORD}
|
||||
- POSTGRES_DB=${PANEL_DB_NAME}
|
||||
- ZBX_ENABLE_SNMP_TRAPS=true
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_COMM}:10051"
|
||||
volumes:
|
||||
- ./data/snmptraps:/var/lib/zabbix/snmptraps:rw
|
||||
- ./data/mibs:/usr/share/snmp/mibs:ro
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
zabbix-web-nginx-pgsql:
|
||||
container_name: ${CONTAINER_NAME}-nginx
|
||||
image: zabbix/zabbix-web-nginx-pgsql:alpine-6.4.13
|
||||
environment:
|
||||
- ZBX_SERVER_HOST=zabbix-server-pgsql
|
||||
- DB_SERVER_HOST=${PANEL_DB_HOST}
|
||||
- POSTGRES_USER=${PANEL_DB_USER}
|
||||
- POSTGRES_PASSWORD=${PANEL_DB_USER_PASSWORD}
|
||||
- POSTGRES_DB=${PANEL_DB_NAME}
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8080"
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
3
apps/zabbix-server/6.4.13-postgres/scripts/init.sh
Normal file
3
apps/zabbix-server/6.4.13-postgres/scripts/init.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown -R 1000:1000 data
|
@ -9,7 +9,9 @@ password:zabbix
|
||||
|
||||
## 注意事项
|
||||
|
||||
**注意:这是Zabbix-MySQL版本的,Zabbix 6.X的需求环境MySQL8**
|
||||
**注意:默认版本是Zabbix-MySQL版本的,Zabbix 6.X的需求环境MySQL8**
|
||||
|
||||
**`postgresql`的版本,资源占用会小很多。**
|
||||
|
||||
商店自带的`MySQL 8`的数据库格式设置与`Zabbix`需求有所不同,`zabbix-server-mysql`容器会提示存在错误。
|
||||
|
||||
|
8
apps/zabbix-server/latest-postgres/.env.sample
Normal file
8
apps/zabbix-server/latest-postgres/.env.sample
Normal file
@ -0,0 +1,8 @@
|
||||
CONTAINER_NAME="zabbix-server"
|
||||
PANEL_APP_PORT_COMM="10051"
|
||||
PANEL_APP_PORT_HTTP="40047"
|
||||
PANEL_APP_PORT_SNMP="1162"
|
||||
PANEL_DB_HOST="127.0.0.1"
|
||||
PANEL_DB_NAME="zabbix"
|
||||
PANEL_DB_USER="zabbix"
|
||||
PANEL_DB_USER_PASSWORD="MyDBPWD_brls9UwcRasl"
|
58
apps/zabbix-server/latest-postgres/data.yml
Normal file
58
apps/zabbix-server/latest-postgres/data.yml
Normal file
@ -0,0 +1,58 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: PANEL_DB_HOST
|
||||
key: postgresql
|
||||
labelEn: Database Service
|
||||
labelZh: 数据库服务
|
||||
required: true
|
||||
type: service
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_NAME
|
||||
labelEn: Database
|
||||
labelZh: 数据库名
|
||||
random: true
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_USER
|
||||
labelEn: User
|
||||
labelZh: 数据库用户
|
||||
random: true
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: zabbix
|
||||
envKey: PANEL_DB_USER_PASSWORD
|
||||
labelEn: Password
|
||||
labelZh: 数据库用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: 10051
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_COMM
|
||||
labelEn: Gateway port
|
||||
labelZh: 网关端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 40047
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 1162
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_SNMP
|
||||
labelEn: Snmptraps Port
|
||||
labelZh: Snmptraps 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
0
apps/zabbix-server/latest-postgres/data/.gitkeep
Normal file
0
apps/zabbix-server/latest-postgres/data/.gitkeep
Normal file
56
apps/zabbix-server/latest-postgres/docker-compose.yml
Normal file
56
apps/zabbix-server/latest-postgres/docker-compose.yml
Normal file
@ -0,0 +1,56 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
zabbix-snmptraps:
|
||||
container_name: ${CONTAINER_NAME}-snmptraps
|
||||
image: zabbix/zabbix-snmptraps:latest
|
||||
volumes:
|
||||
- ./data/snmptraps:/var/lib/zabbix/snmptraps:rw
|
||||
- ./data/mibs:/usr/share/snmp/mibs:ro
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_SNMP}:1162/udp"
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
zabbix-server-pgsql:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
image: zabbix/zabbix-server-pgsql:latest
|
||||
environment:
|
||||
- DB_SERVER_HOST=${PANEL_DB_HOST}
|
||||
- POSTGRES_USER=${PANEL_DB_USER}
|
||||
- POSTGRES_PASSWORD=${PANEL_DB_USER_PASSWORD}
|
||||
- POSTGRES_DB=${PANEL_DB_NAME}
|
||||
- ZBX_ENABLE_SNMP_TRAPS=true
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_COMM}:10051"
|
||||
volumes:
|
||||
- ./data/snmptraps:/var/lib/zabbix/snmptraps:rw
|
||||
- ./data/mibs:/usr/share/snmp/mibs:ro
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
zabbix-web-nginx-pgsql:
|
||||
container_name: ${CONTAINER_NAME}-nginx
|
||||
image: zabbix/zabbix-web-nginx-pgsql:latest
|
||||
environment:
|
||||
- ZBX_SERVER_HOST=zabbix-server-pgsql
|
||||
- DB_SERVER_HOST=${PANEL_DB_HOST}
|
||||
- POSTGRES_USER=${PANEL_DB_USER}
|
||||
- POSTGRES_PASSWORD=${PANEL_DB_USER_PASSWORD}
|
||||
- POSTGRES_DB=${PANEL_DB_NAME}
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8080"
|
||||
restart: always
|
||||
labels:
|
||||
createdBy: Apps
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
3
apps/zabbix-server/latest-postgres/scripts/init.sh
Normal file
3
apps/zabbix-server/latest-postgres/scripts/init.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown -R 1000:1000 data
|
Loading…
Reference in New Issue
Block a user