Commit Graph

10 Commits

Author SHA1 Message Date
Kpa-clawbot
e35e498672 feat: Go is now the default — Dockerfile.go becomes Dockerfile
Go server is production-ready. Users upgrading via git pull + manage.sh
get Go automatically. No flags, no engine selection, no decision needed.

- Dockerfile (was Dockerfile.go) — Go multi-stage build
- Dockerfile.node — archived Node.js build for rollback
- docker-compose staging-go now builds from Dockerfile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 00:35:39 -07:00
Kpa-clawbot
d16d3dffd6 fix: remove MQTT_BROKER env override — let config.json mqttSources connect to external brokers
The env var was overriding the config and forcing Go staging to only
connect to its own empty local mosquitto, missing all external data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 17:27:08 -07:00
Kpa-clawbot
0d9b535451 feat: add version and git commit to /api/stats and /api/health
Node.js: reads version from package.json, commit from .git-commit file
or git rev-parse --short HEAD at runtime, with unknown fallback.

Go: uses -ldflags build-time variables (Version, Commit) with fallback
to .git-commit file and git command at runtime.

Dockerfile: copies .git-commit if present (CI bakes it before build).
Dockerfile.go: passes APP_VERSION and GIT_COMMIT as build args to ldflags.
deploy.yml: writes GITHUB_SHA to .git-commit before docker build steps.
docker-compose.yml: passes build args to Go staging build.

Tests updated to verify version and commit fields in both endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 09:39:49 -07:00
Kpa-clawbot
e3cb0421b1 fix(docker): resolve Go staging port conflict and MQTT connectivity
- Change staging-go HTTP port from 81 to 82 (via STAGING_GO_HTTP_PORT)
  to avoid conflict with CI's Node.js staging on port 81
- Change staging-go MQTT port from 1884 to 1885 (via STAGING_GO_MQTT_PORT)
  to avoid conflict with Node.js staging MQTT on port 1884
- Add MQTT_BROKER=mqtt://localhost:1883 env var so Go ingestor connects
  to its own internal mosquitto instead of unreachable prod external IP

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 08:42:51 -07:00
Kpa-clawbot
6d7a4017dd fix: staging-go port mapping 81:80 (Caddy listens on 80 inside container)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 01:22:22 -07:00
Kpa-clawbot
9737374c40 Add Go staging deployment: Dockerfile.go, supervisord-go, compose staging-go service
- Multi-stage Dockerfile builds Go server + ingestor (pure Go SQLite, no CGO)
- supervisord-go.conf runs meshcore-server + meshcore-ingestor + mosquitto + caddy
- staging-go compose service on port 81/1884 with staging-go profile
- Identical volume/config structure to Node.js deployment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 01:15:25 -07:00
Kpa-clawbot
11efd7b22c unify docker-compose.yml volume names with manage.sh
- Remove deprecated version: '3.8' key (Docker warns about it)
- Rename caddy-data-prod → caddy-data to match manage.sh CADDY_VOLUME
- All mount paths now identical between manage.sh docker-run and compose:
  config.json, Caddyfile from repo checkout; data via PROD_DATA_DIR env var;
  Caddy certs in 'caddy-data' named volume
- Staging unchanged (uses separate data dir per manage.sh prepare_staging_*)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 00:23:57 -07:00
Kpa-clawbot
7d332043ad fix: align compose prod volume mounts with manage.sh paths
Caddyfile and config.json mounts now use the same paths as
manage.sh (./caddy-config/Caddyfile and ./config.json) instead of
~/meshcore-data/ which was never created by setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 00:20:05 -07:00
Kpa-clawbot
464aa3b953 feat: manage.sh Docker Compose + staging support
Milestone 2 of #132. Updates manage.sh to use docker-compose.yml when present:
- start/start --with-staging (copies prod DB + config to staging)
- stop [prod|staging|all]
- status shows both containers
- logs [prod|staging]
- promote (backup prod, restart with latest image)
Legacy single-container mode preserved as fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 21:07:34 -07:00
Kpa-clawbot
a69d00c423 feat: add Docker Compose for prod/staging environments
Milestone 1 of #132. Adds docker-compose.yml with prod + staging services,
.env.example for port/data configuration, and Caddyfile.staging for HTTP-only
staging proxy. No changes to Dockerfile or server.js — same image, different
config.

Fixes #132 (partially)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 20:51:23 -07:00