integrate docker for gateway, prometheus and grafana #15

Merged
salmaelsoly merged 8 commits from master_docker into master 2026-02-12 14:11:36 +00:00
Member

#3
image
image

#3 ![image](/attachments/6e99a52b-05b9-4fb9-9dde-148c365e7e3d) ![image](/attachments/a46fc3cf-304e-4ca3-acf6-bcc000047f21)
refactor: adjust prometheus and grafana to use bridged network instead of host
All checks were successful
Build / build (push) Successful in 1m35s
Build / build (pull_request) Successful in 1m32s
Lint / lint (pull_request) Successful in 1m14s
Test / test (pull_request) Successful in 1m33s
Test / test (push) Successful in 10m35s
Lint / lint (push) Successful in 10m51s
677875ef0e
salmaelsoly changed title from master_docker to WIP: master_docker 2026-02-11 06:39:12 +00:00
salmaelsoly changed title from WIP: master_docker to WIP: integrate docker for gateway, prometheus and grafana 2026-02-11 06:39:39 +00:00
refactor: remove grafana polling in favor of docker healthcheck
All checks were successful
Build / build (pull_request) Successful in 1m31s
Lint / lint (pull_request) Successful in 1m17s
Test / test (pull_request) Successful in 1m37s
Test / test (push) Successful in 1m33s
Build / build (push) Successful in 10m17s
Lint / lint (push) Successful in 10m36s
fef3176347
salmaelsoly changed title from WIP: integrate docker for gateway, prometheus and grafana to integrate docker for gateway, prometheus and grafana 2026-02-11 06:52:34 +00:00
thabeta requested changes 2026-02-11 09:45:03 +00:00
Dismissed
thabeta left a comment
Owner

we should have another docker-compose.development.yml for adding step-ca and extra caddy config to work with step-ca

we should have another docker-compose.development.yml for adding step-ca and extra caddy config to work with step-ca
@ -52,0 +54,4 @@
prometheus-data/
grafana-data/
gateway.db
step/
Owner

this causes issues because if step/ dir doesn't exist docker will create it as root (on some systems) and step-ca won't work. step dir already has .gitignore for all files under step/* so it's not needed

this causes issues because if step/ dir doesn't exist docker will create it as root (on some systems) and step-ca won't work. step dir already has .gitignore for all files under step/* so it's not needed
salmaelsoly marked this conversation as resolved
.gitignore Outdated
@ -52,0 +55,4 @@
grafana-data/
gateway.db
step/
test_keys/
Owner

this is already added before

this is already added before
salmaelsoly marked this conversation as resolved
@ -130,6 +130,7 @@ func (m *Mycelium) LoadConfig(ctx caddy.Context) ([]byte, error) {
var persist = true
cfg := &caddy.Config{
Admin: &caddy.AdminConfig{
Listen: ":2019",
Owner

this is added automatically, right? also it should be only on localhost

this is added automatically, right? also it should be only on localhost
salmaelsoly marked this conversation as resolved
@ -0,0 +1,214 @@
package main
Owner

we don't need an executable to have a pre configured grafana image. dashboards, alerts, datasources, etc... are all configured with json/yaml files which we can have as part of a dir grafana/ and added to grafana image directly. check out this for example:
https://github.com/vilaca/prometheus-cookbook/tree/main/ha-with-promxy

we don't need an executable to have a pre configured grafana image. dashboards, alerts, datasources, etc... are all configured with json/yaml files which we can have as part of a dir grafana/ and added to grafana image directly. check out this for example: https://github.com/vilaca/prometheus-cookbook/tree/main/ha-with-promxy
Author
Member

this was mainly to create the new dashboard for the gateway instead of writing a json file to be more clear, but np can remove it

this was mainly to create the new dashboard for the gateway instead of writing a json file to be more clear, but np can remove it
salmaelsoly marked this conversation as resolved
@ -0,0 +8,4 @@
volumes:
- ./caddy.json:/app/caddy.json
- ./test_keys:/app/test_keys:ro
- ./step:/app/step:ro
Owner

this is not needed. or at least not needed in this docker-compose

this is not needed. or at least not needed in this docker-compose
salmaelsoly marked this conversation as resolved
@ -0,0 +9,4 @@
- ./caddy.json:/app/caddy.json
- ./test_keys:/app/test_keys:ro
- ./step:/app/step:ro
- ./gateway.db:/app/gateway.db
Owner

if it doesn't exist it will be created as a dir which will cause some issues. maybe it should be under a dir called data/ which can be mounted instead

if it doesn't exist it will be created as a dir which will cause some issues. maybe it should be under a dir called data/ which can be mounted instead
salmaelsoly marked this conversation as resolved
@ -0,0 +15,4 @@
prometheus:
image: prom/prometheus:latest
extra_hosts:
- "host.docker.internal:host-gateway"
Owner

why is that needed?

why is that needed?
salmaelsoly marked this conversation as resolved
refactor: replace grafana-dashboard service with preconfigured image and use host networking
Some checks failed
Test / test (pull_request) Waiting to run
Build / build (push) Successful in 1m35s
Test / test (push) Successful in 1m39s
Build / build (pull_request) Successful in 1m28s
Lint / lint (push) Has been cancelled
Lint / lint (pull_request) Has been cancelled
8c3b943173
salmaelsoly force-pushed master_docker from 8c3b943173
Some checks failed
Test / test (pull_request) Waiting to run
Build / build (push) Successful in 1m35s
Test / test (push) Successful in 1m39s
Build / build (pull_request) Successful in 1m28s
Lint / lint (push) Has been cancelled
Lint / lint (pull_request) Has been cancelled
to e5219cc937
Some checks are pending
Build / build (push) Waiting to run
Build / build (pull_request) Waiting to run
Lint / lint (push) Waiting to run
Test / test (push) Waiting to run
Lint / lint (pull_request) Waiting to run
Test / test (pull_request) Waiting to run
2026-02-11 11:05:10 +00:00
Compare
refactor: remove hardcoded admin listen port from mycelium module config
All checks were successful
Lint / lint (push) Successful in 1m17s
Build / build (pull_request) Successful in 1m30s
Test / test (push) Successful in 1m33s
Lint / lint (pull_request) Successful in 1m13s
Test / test (pull_request) Successful in 1m31s
Build / build (push) Successful in 10m14s
65a3775d9a
feat: add docker development environment with step-ca and update documentation
Some checks are pending
Build / build (push) Waiting to run
Lint / lint (push) Waiting to run
Test / test (push) Waiting to run
Build / build (pull_request) Waiting to run
Lint / lint (pull_request) Waiting to run
Test / test (pull_request) Waiting to run
747fc359b8
refactor: restructure docker to use mycelium networking and improve dev environment setup
All checks were successful
Build / build (push) Successful in 1m31s
Lint / lint (push) Successful in 1m13s
Test / test (push) Successful in 1m31s
Build / build (pull_request) Successful in 1m29s
Lint / lint (pull_request) Successful in 1m13s
Test / test (pull_request) Successful in 1m33s
341d06c9c7
refactor: simplify docker networking to be bridged
All checks were successful
Build / build (push) Successful in 10m17s
Lint / lint (push) Successful in 10m33s
Test / test (push) Successful in 10m20s
Lint / lint (pull_request) Successful in 1m17s
Build / build (pull_request) Successful in 10m18s
Test / test (pull_request) Successful in 10m43s
f9556efbca
thabeta approved these changes 2026-02-12 14:05:16 +00:00
salmaelsoly deleted branch master_docker 2026-02-12 14:11:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/webgateway!15
No description provided.