[修改]数据映射

This commit is contained in:
10908
2024-10-09 15:43:28 +08:00
committed by Coding
parent f8dbe17c6a
commit 13467b75d2
7 changed files with 96 additions and 2 deletions

52
data/etcd/etc/etcd.conf Normal file
View File

@@ -0,0 +1,52 @@
# [member]
ETCD_NAME=default
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
#ETCD_WAL_DIR=""
ETCD_SNAPSHOT_COUNT="10000"
#ETCD_HEARTBEAT_INTERVAL="100"
#ETCD_ELECTION_TIMEOUT="1000"
#ETCD_LISTEN_PEER_URLS="http://localhost:2380"
ETCD_LISTEN_CLIENT_URLS="http://localhost:2379"
#ETCD_MAX_SNAPSHOTS="5"
#ETCD_MAX_WALS="5"
#ETCD_CORS=""
#
#[cluster]
#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380"
# if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..."
#ETCD_INITIAL_CLUSTER="default=http://localhost:2380"
#ETCD_INITIAL_CLUSTER_STATE="new"
#ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
#ETCD_DISCOVERY=""
#ETCD_DISCOVERY_SRV=""
#ETCD_DISCOVERY_FALLBACK="proxy"
#ETCD_DISCOVERY_PROXY=""
#ETCD_STRICT_RECONFIG_CHECK="false"
#ETCD_AUTO_COMPACTION_RETENTION="0"
#
#[proxy]
#ETCD_PROXY="off"
#ETCD_PROXY_FAILURE_WAIT="5000"
#ETCD_PROXY_REFRESH_INTERVAL="30000"
#ETCD_PROXY_DIAL_TIMEOUT="1000"
#ETCD_PROXY_WRITE_TIMEOUT="5000"
#ETCD_PROXY_READ_TIMEOUT="0"
#
#[security]
#ETCD_CERT_FILE=""
#ETCD_KEY_FILE=""
#ETCD_CLIENT_CERT_AUTH="false"
#ETCD_TRUSTED_CA_FILE=""
#ETCD_AUTO_TLS="false"
#ETCD_PEER_CERT_FILE=""
#ETCD_PEER_KEY_FILE=""
#ETCD_PEER_CLIENT_CERT_AUTH="false"
#ETCD_PEER_TRUSTED_CA_FILE=""
#ETCD_PEER_AUTO_TLS="false"
#
#[logging]
#ETCD_DEBUG="false"
# examples for -log-package-levels etcdserver=WARNING,security=DEBUG
#ETCD_LOG_PACKAGE_LEVELS=""

Binary file not shown.

View File

@@ -0,0 +1,13 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'node_exporter'
scrape_interval: 10s
static_configs:
- targets: [ '127.0.0.1:9100' ]
- job_name: 'opcua_exporter'
scrape_interval: 10s
static_configs:
- targets: [ '127.0.0.1:8191' ]

View File

@@ -0,0 +1,20 @@
[supervisord]
nodaemon=true ; 让 supervisor 运行在前台,保持容器不退出
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:confd]
command=/usr/local/bin/confd -config-file /etc/confd/confd.toml
autostart=true
autorestart=true
stderr_logfile=/var/log/confd.err.log
stdout_logfile=/var/log/confd.out.log
[program:prometheus]
command=/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml
autostart=true
autorestart=true
stderr_logfile=/var/log/prometheus.err.log
stdout_logfile=/var/log/prometheus.out.log

View File

@@ -5,8 +5,14 @@ services:
- 2379:2379
- 2380:2370
network_mode: host
volumes:
- ./data/etcd/data:/var/lib/etcd
- ./data/etcd/etc:/etc/etcd
prometheus:
build: docker/prometheus
volumes:
- ./data/prometheus/etc/prometheus:/etc/prometheus
- ./data/prometheus/etc/supervisord:/etc/supervisord
ports:
- 9090:9090
depends_on:
@@ -15,7 +21,8 @@ services:
panel:
build: management-panel
volumes:
- '/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket'
- ./data/panel/storage/app:/app/storage/app
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
entrypoint: /app/entrypoint.sh
command: php artisan octane:start --server=swoole --workers=4 --host=0.0.0.0 --port=8000
ports:

View File

@@ -19,7 +19,8 @@ RUN dnf update -y \
# 设置环境变量
ENV ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379" \
ETCD_ADVERTISE_CLIENT_URLS="http://127.0.0.1:2379"
ETCD_ADVERTISE_CLIENT_URLS="http://127.0.0.1:2379" \
ETCD_DATA_DIR=/var/lib/etcd/
# 暴露端口
EXPOSE 2379 2380

View File

@@ -20,6 +20,7 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=sqlite
DB_DATABASE=/app/storage/app/database.sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel