Skip to content

Commit

Permalink
Add docker-compose files for easy usage
Browse files Browse the repository at this point in the history
  • Loading branch information
awaescher committed May 14, 2024
1 parent 0556525 commit 32d6d2b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,5 @@ FodyWeavers.xsd
*.sln.iml

tools/
MaxPower/out/
MaxPower/out/
usage-with-docker-compose/volumes/
38 changes: 38 additions & 0 deletions usage-with-docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
services:
maxpower:
image: awaescher/maxpower:latest
container_name: maxpower
ports:
- "8080:8080"
env_file:
- maxpower.env
restart: always

prometheus:
image: prom/prometheus:latest
container_name: prometheus
user: root
command:
- '--storage.tsdb.retention.time=30d' # keep data 30 days - all the values below are just defaults that need to be defined if commands are used
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "9090:9090"
volumes:
- ./volumes/prometheus/data:/prometheus
- ./volumes/prometheus/etc:/etc
restart: always

grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "9091:3000"
user: "0"
links:
- prometheus
volumes:
- ./volumes/grafana:/var/lib/grafana
restart: always
10 changes: 10 additions & 0 deletions usage-with-docker-compose/maxpower.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MaxSettings__PollIntervalSeconds=60
MaxSettings__UseMockData=true

Inverters__0__Ip=192.168.178.241
Inverters__0__Id=1
Inverters__0__Port=12345

Inverters__1__Ip=192.168.178.242
Inverters__1__Id=2
Inverters__1__Port=12345
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global:
scrape_interval: 300s
evaluation_interval: 300s

scrape_configs:
- job_name: "maxpower metrics"
static_configs:
- targets: ["maxpower:8080"]

0 comments on commit 32d6d2b

Please sign in to comment.