Skip to content

Commit

Permalink
Merge pull request #8 from mnellemann/podman-compose-examples
Browse files Browse the repository at this point in the history
podman/docker-compose-examples
  • Loading branch information
mnellemann authored Jun 20, 2024
2 parents 4fab60e + 4164cdf commit 81b0c75
Show file tree
Hide file tree
Showing 10 changed files with 5,876 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
- [] Container
- [] Use best practice for dockerfiles, like run with user for non root.
- [] K8 Deployment?
- [] Config file as a environment variables? secret in K8/OC?

- [] Grafana.
- [] Updated Grafana dashboard with new stats from XML
- [] Events/Message/Alarms from Virtualize? - /lseventlog

- [] SVCi/Virtualize Metric
- [] Logging level
Expand Down
11 changes: 11 additions & 0 deletions doc/examples/docker-podman-compose/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change to your's environment.
GRAFANA_USERNAME=admin
GRAFANA_PASSWORD=admin1234!
INFLUXDB_INIT_MODE=setup
INFLUXDB_INIT_USERNAME=admin
INFLUXDB_INIT_PASSWORD=admin1234!
INFLUXDB_INIT_ORG=test
INFLUXDB_INIT_BUCKET=svci
INFLUXDB_INIT_RETENTION=356d
# Remeber to use same token in svci.toml
INFLUXDB_INIT_ADMIN_TOKEN="hTHG-mwhRypjO8nZEmdzVKL4fM7kJH7989MC9JdgXacVHfBsks8AzeIwhqv-sXm76dphjO5pvqv5Fmsvw_zvGA=="
62 changes: 62 additions & 0 deletions doc/examples/docker-podman-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
services:
influxdb:
image: influxdb:latest
container_name: influxdb-sme
ports:
- 8086:8086
- 8088:8088
volumes:
- influxdb-storage:/var/lib/influxdb
environment:
# .env files automatically picked up if exist in same folder.
# PS: Password need to be some length.
# if you dont want to have secrets in env, use podman/docker secret create
# With the DOCKER_INFLUXDB_ Prefix this will then be picked up by influxdb container
- DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE}
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG}
- DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN}
#networks:
# - external_network
grafana:
image: grafana/grafana:latest
container_name: grafana-sme
ports:
- 3000:3000
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana-provisioning/:/etc/grafana/provisioning/
depends_on:
- influxdb-sme
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- DOCKER_INFLUXDB_INIT_MODE=${INFLUXDB_INIT_MODE}
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_INIT_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_INIT_PASSWORD}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_INIT_BUCKET}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_INIT_ORG}
- DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_INIT_RETENTION}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_INIT_ADMIN_TOKEN}
#networks:
# - external_network
svci:
image: ghcr.io/mnellemann/svci:latest
container_name: storage_metric_exporter-sme
restart: unless-stopped
#command:
volumes:
- ./svci-data:/opt/app/config/
depends_on:
- grafana-sme
#networks:
# - external_network
#networks:
# external_network:
# external: true
volumes:
influxdb-storage:
grafana-storage:
Loading

0 comments on commit 81b0c75

Please sign in to comment.