Paws/Docker/Docker-Compose/Endlessh/docker-compose.yml

47 lines
1.4 KiB
YAML

name: endlessh-stack
services:
######################################################
# Endlessh
# URL: https://github.com/shizunge/endlessh-go
######################################################
endlessh:
image: shizunge/endlessh-go:latest
restart: unless-stopped
#user: root
command:
- "-interval_ms=1000"
- "-logtostderr"
- "-v=1"
- "-enable_prometheus"
- "-geoip_supplier=max-mind-db"
- "-max_mind_db=/geo-data/GeoLite2-City.mmdb"
ports:
- 22:2222 # SSH port
- ${MONITORING_ADDR:-127.0.0.1}:2112:2112 # Prometheus metrics port
volumes:
- ./geo-data/:/geo-data/:ro # geoip data
logging:
driver: loki
options:
loki-url: "${LOKI_URL}"
######################################################
# MaxMind GeoIP Updater
# Docs: https://github.com/maxmind/geoipupdate/blob/main/doc/docker.md
######################################################
geoipupdate:
image: ghcr.io/maxmind/geoipupdate:v5
restart: unless-stopped
security_opt: [ "no-new-privileges:true" ]
volumes:
- ./geo-data/:/usr/share/GeoIP/
environment:
- GEOIPUPDATE_EDITION_IDS=GeoLite2-City
- GEOIPUPDATE_FREQUENCY=72
- GEOIPUPDATE_ACCOUNT_ID=${MAXMIND_ACCOUNT_ID}
- GEOIPUPDATE_LICENSE_KEY=${MAXMIND_LICENSE_KEY}
logging:
driver: loki
options:
loki-url: "${LOKI_URL}"