Using long syntax to expose ports

This commit is contained in:
Alexey Pustovalov 2024-09-20 01:25:39 +09:00
parent 87fb470db0
commit 7da1ef4c76

View File

@ -2,7 +2,11 @@ services:
server:
init: true
ports:
- "${ZABBIX_SERVER_PORT}:10051"
- name: zabbix-trapper
target: 10051
published: "${ZABBIX_SERVER_PORT}"
protocol: tcp
app_protocol: zabbix-trapper
restart: "${RESTART_POLICY}"
attach: true
volumes:
@ -15,7 +19,7 @@ services:
- ${DATA_DIRECTORY}/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ${DATA_DIRECTORY}/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
- ${DATA_DIRECTORY}/var/lib/zabbix/mibs:/var/lib/zabbix/mibs:ro
- snmptraps:/var/lib/zabbix/snmptraps:ro
- snmptraps:/var/lib/zabbix/snmptraps:roz
tmpfs: /tmp
ulimits:
nproc: 65535
@ -150,7 +154,11 @@ services:
extends:
service: proxy
ports:
- "${ZABBIX_PROXY_SQLITE3_PORT}:10051"
- name: zabbix-trapper
target: 10051
published: "${ZABBIX_PROXY_SQLITE3_PORT}"
protocol: tcp
app_protocol: zabbix-trapper
env_file:
- ${ENV_VARS_DIRECTORY}/.env_prx_sqlite3
- path: ${ENV_VARS_DIRECTORY}/.env_prx_sqlite3_override
@ -167,7 +175,11 @@ services:
extends:
service: proxy
ports:
- "${ZABBIX_PROXY_MYSQL_PORT}:10051"
- name: zabbix-trapper
target: 10051
published: "${ZABBIX_PROXY_MYSQL_PORT}"
protocol: tcp
app_protocol: zabbix-trapper
# volumes:
# - dbsocket:/var/run/mysqld/
env_file:
@ -196,8 +208,16 @@ services:
profiles:
- all
ports:
- "${ZABBIX_WEB_APACHE_HTTP_PORT}:8080"
- "${ZABBIX_WEB_APACHE_HTTPS_PORT}:8443"
- name: web-http
target: 8080
published: "${ZABBIX_WEB_APACHE_HTTP_PORT}"
protocol: tcp
app_protocol: http
- name: web-https
target: 8443
published: "${ZABBIX_WEB_APACHE_HTTPS_PORT}"
protocol: tcp
app_protocol: https
restart: "${RESTART_POLICY}"
attach: false
volumes:
@ -274,8 +294,16 @@ services:
web-nginx:
ports:
- "${ZABBIX_WEB_NGINX_HTTP_PORT}:8080"
- "${ZABBIX_WEB_NGINX_HTTPS_PORT}:8443"
- name: web-http
target: 8080
published: "${ZABBIX_WEB_NGINX_HTTP_PORT}"
protocol: tcp
app_protocol: http
- name: web-https
target: 8443
published: "${ZABBIX_WEB_NGINX_HTTPS_PORT}"
protocol: tcp
app_protocol: https
restart: "${RESTART_POLICY}"
attach: false
volumes:
@ -360,7 +388,11 @@ services:
- full
- all
ports:
- "${ZABBIX_AGENT_PORT}:10050"
- name: zabbix-agent
target: 10050
published: "${ZABBIX_AGENT_PORT}"
protocol: tcp
app_protocol: zabbix-agent
restart: "${RESTART_POLICY}"
attach: false
volumes:
@ -402,7 +434,11 @@ services:
- full
- all
ports:
- "${ZABBIX_AGENT2_PORT}:10050"
- name: zabbix-agent
target: 10050
published: "${ZABBIX_AGENT2_PORT}"
protocol: tcp
app_protocol: zabbix-agent
restart: "${RESTART_POLICY}"
attach: false
volumes:
@ -443,7 +479,10 @@ services:
- full
- all
ports:
- "${ZABBIX_JAVA_GATEWAY_PORT}:10052"
- name: zabbix-java-gw
target: 10052
published: "${ZABBIX_JAVA_GATEWAY_PORT}"
protocol: tcp
restart: "${RESTART_POLICY}"
attach: false
deploy:
@ -477,12 +516,16 @@ services:
- full
- all
ports:
- "${ZABBIX_SNMPTRAPS_PORT}:1162/udp"
- name: snmptrap
target: 1162
published: "${ZABBIX_SNMPTRAPS_PORT}"
protocol: udp
app_protocol: snmptrap
restart: "${RESTART_POLICY}"
attach: false
read_only: true
volumes:
- snmptraps:/var/lib/zabbix/snmptraps:rw
- snmptraps:/var/lib/zabbix/snmptraps:rwz
tmpfs: /tmp
deploy:
resources:
@ -512,7 +555,10 @@ services:
- full
- all
ports:
- "${ZABBIX_WEB_SERVICE_PORT}:10053"
- name: zabbix-web-service
target: 10053
published: "${ZABBIX_WEB_SERVICE_PORT}"
protocol: tcp
restart: "${RESTART_POLICY}"
attach: false
volumes: