This commit is contained in:
cventastic
2021-12-29 14:49:35 +01:00
parent 619b8245cd
commit ba1b091257
6 changed files with 181 additions and 144 deletions

View File

@@ -28,6 +28,94 @@ services:
- "traefik.enable=true"
- "traefik.http.middlewares.ipwhitelist.ipwhitelist.sourcerange=$WHITELIST"
### WIREGUARD
wireguard:
image: lscr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=$PUID
- PGID=$PGID
volumes:
- ./wireguard/config/wg0.conf:/config/wg0.conf
- /lib/modules:/lib/modules
# Expose prometheus port
expose:
- 9090
ports:
- $SERVERPORT:$SERVERPORT/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
### MONITORING
prometheus:
image: prom/prometheus:v2.30.3
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
network_mode: "service:wireguard"
labels:
org.label-schema.group: "monitoring"
depends_on:
- wireguard
nodeexporter:
image: prom/node-exporter:v1.2.2
container_name: nodeexporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
expose:
- 9100
labels:
org.label-schema.group: "monitoring"
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.42.0
container_name: cadvisor
privileged: true
devices:
- /dev/kmsg:/dev/kmsg
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
restart: unless-stopped
expose:
- 8080
labels:
org.label-schema.group: "monitoring"
pushgateway:
image: prom/pushgateway:v1.4.2
container_name: pushgateway
restart: unless-stopped
expose:
- 9091
labels:
org.label-schema.group: "monitoring"
pocket-testnet:
image: poktnetwork/pocket-core:stagenet-latest
ports:
@@ -36,7 +124,6 @@ services:
expose:
- 26656
- 8081
- 443
command: pocket start --seeds=$POCKET_TEST_SEEDS --testnet
#command: pocket start --simulateRelay
environment:
@@ -54,7 +141,8 @@ services:
- "traefik.http.routers.pocket-testnet.rule=Host(`$TEST_DOMAIN`) && PathPrefix(`/pokttest`)"
- "traefik.http.routers.pocket-testnet.middlewares=ipwhitelist"
### VOLUMES
volumes:
pocket-testnet:
prometheus_data: