Skip to content

Commit

Permalink
fix docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lin.huang committed Nov 13, 2023
1 parent 4588302 commit c55e37f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
4 changes: 4 additions & 0 deletions deployments/templates/env_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ PROMETHEUS_NETWORK_ADDRESS=${PROMETHEUS_NETWORK_ADDRESS}
# Address or hostname for the Grafana network.
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
GRAFANA_NETWORK_ADDRESS=${GRAFANA_NETWORK_ADDRESS}

# Address or hostname for the node_exporter network.
# Default: NODE_EXPORTER_NETWORK_ADDRESS=172.28.0.13
NODE_EXPORTER_NETWORK_ADDRESS=${NODE_EXPORTER_NETWORK_ADDRESS}


# ===============================================
Expand Down
27 changes: 15 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,8 @@ services:
ports:
- "${PROMETHEUS_PORT}:9090"
networks:
- server

node-exporter:
image: quay.io/prometheus/node-exporter
container_name: node-exporter
hostname: node-exporter
restart: always
ports:
- "${NODE_EXPORTER_PORT}:9100"
networks:
- server
server:
ipv4_address: ${PROMETHEUS_NETWORK_ADDRESS}

grafana:
image: grafana/grafana
Expand All @@ -174,4 +165,16 @@ services:
volumes:
- ${DATA_DIR}/components/grafana:/var/lib/grafana
networks:
- server
server:
ipv4_address: ${GRAFANA_NETWORK_ADDRESS}

node-exporter:
image: quay.io/prometheus/node-exporter
container_name: node-exporter
hostname: node-exporter
restart: always
ports:
- "${NODE_EXPORTER_PORT}:9100"
networks:
server:
ipv4_address: ${NODE_EXPORTER_NETWORK_ADDRESS}
3 changes: 2 additions & 1 deletion scripts/install/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ LAST_OCTET=$((LAST_OCTET + 1))
PROMETHEUS_NETWORK_ADDRESS=$(generate_ip)
LAST_OCTET=$((LAST_OCTET + 1))
GRAFANA_NETWORK_ADDRESS=$(generate_ip)

LAST_OCTET=$((LAST_OCTET + 1))
NODE_EXPORTER_NETWORK_ADDRESS=$(generate_ip)
###################### openim 配置 ######################
# read: https://github.com/openimsdk/open-im-server/blob/main/deployment/README.md
def "OPENIM_DATA_DIR" "/data/openim"
Expand Down

0 comments on commit c55e37f

Please sign in to comment.