update Dockerfile and README. And add maxmind example
Signed-off-by: Ivan Schaller <ivan@schaller.sh>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
version: '3.5'
|
||||
services:
|
||||
|
||||
endlessh:
|
||||
container_name: endlessh
|
||||
image: shizunge/endlessh-go:latest
|
||||
@@ -13,16 +14,14 @@ services:
|
||||
networks:
|
||||
- example_network
|
||||
ports:
|
||||
# SSH port
|
||||
- 2222:2222
|
||||
# Prometheus metrics port
|
||||
- 127.0.0.1:2112:2112
|
||||
- 2222:2222 # SSH port
|
||||
- 127.0.0.1:2112:2112 # Prometheus metrics port
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: always
|
||||
command:
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --storage.tsdb.retention.time=45d
|
||||
@@ -55,6 +54,7 @@ services:
|
||||
networks:
|
||||
example_network:
|
||||
|
||||
|
||||
volumes:
|
||||
prometheus:
|
||||
grafana_var:
|
||||
|
||||
36
examples/docker-simple/docker-compose_maxmind.yml
Normal file
36
examples/docker-simple/docker-compose_maxmind.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
version: "3"
|
||||
services:
|
||||
|
||||
endlessh:
|
||||
container_name: endlessh
|
||||
image: shizunge/endlessh-go:latest
|
||||
restart: unless-stopped
|
||||
#user: root
|
||||
command:
|
||||
- "-logtostderr"
|
||||
- "-v=1"
|
||||
- "-geoip_supplier=max-mind-db"
|
||||
- "-max_mind_db=/geo-data/GeoLite2-City.mmdb"
|
||||
networks:
|
||||
- example_network
|
||||
ports:
|
||||
- 2222:2222 # SSH port
|
||||
- 127.0.0.1:2112:2112 # Prometheus metrics port
|
||||
volumes:
|
||||
- ./geo-data/:/geo-data/:ro # geoip data
|
||||
|
||||
geoipupdate:
|
||||
image: ghcr.io/maxmind/geoipupdate:v5
|
||||
container_name: geoipupdate
|
||||
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=xxxxxx
|
||||
- GEOIPUPDATE_LICENSE_KEY=xxxxxx
|
||||
|
||||
networks:
|
||||
example_network:
|
||||
Reference in New Issue
Block a user