Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .dockerignore

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/docker.yml

This file was deleted.

114 changes: 0 additions & 114 deletions Dockerfile

This file was deleted.

16 changes: 1 addition & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CACHE ?= $(if $(XDG_CACHE_HOME),$(XDG_CACHE_HOME),$(HOME)/.cache)/chartplotter
S101_PC ?= $(HOME)/Projects/s101-portrayal-catalogue/PortrayalCatalog
S101_FC ?= $(HOME)/Projects/s101-feature-catalogue/S-101FC/FeatureCatalogue.xml

.PHONY: build build-tile57 tile57-lib vendor-style-engine xbuild xbuild-tile57 musl test vet fmt fmt-check tidy clean clear-cache serve docs docs-shots bake-ienc bake-noaa serve-widget demo demo-chart1 serve-demo preslib-chart1 s64-pages
.PHONY: build build-tile57 tile57-lib vendor-style-engine xbuild xbuild-tile57 test vet fmt fmt-check tidy clean clear-cache serve docs docs-shots bake-ienc bake-noaa serve-widget demo demo-chart1 serve-demo preslib-chart1 s64-pages

# Prebaked prod test set (US Inland ENC bundle + the NOAA world archive).
# NB: keep these as bare values with NO inline `#` comments — Make folds any
Expand Down Expand Up @@ -137,20 +137,6 @@ build-tile57: build ## Alias for `build` (libtile57 is the sole engine now)
xbuild xbuild-tile57: $(TILE57)/include/tile57.h ## Cross-compile CGO+libtile57 binaries with zig cc (linux+windows; darwin builds on a Mac runner)
VERSION="$(VERSION)" TILE57="$(TILE57)" ENGINE_COMMIT="$(ENGINE_COMMIT)" scripts/xbuild-tile57.sh

# Fully-static musl binaries for the tiny FROM scratch Docker image (the "go-dims"
# pattern): CGO+libtile57 linked against musl STATICALLY via zig cc, so `ldd` reports
# "not a dynamic executable" and the binary drops straight into `FROM scratch`. Builds
# linux/amd64 + linux/arm64 into dist/chartplotter_linux_<arch>_musl (same zig-cc
# cross-build as xbuild — no QEMU; one host cross-links both arches by target swap).
# The Dockerfile calls scripts/xbuild-tile57.sh with LIBC=musl directly; this target
# is the local/CI equivalent. musl-static is strictly more portable than the gnu
# xbuild (no glibc floor), so it's the recommended linux artifact — the gnu xbuild
# path is kept intact for anyone who needs a glibc-dynamic build.
MUSL_PLATFORMS ?= linux/amd64 linux/arm64
musl: $(TILE57)/include/tile57.h ## Build fully-static musl binaries (linux amd64+arm64) into dist/ for the scratch Docker image
VERSION="$(VERSION)" TILE57="$(TILE57)" ENGINE_COMMIT="$(ENGINE_COMMIT)" \
LIBC=musl PLATFORMS="$(MUSL_PLATFORMS)" scripts/xbuild-tile57.sh

serve: build ## Serve the web frontend + provisioning API on :8080 (HOST/PORT/ASSETS overridable)
$(BIN) serve --host $(HOST) --port $(PORT) --assets $(ASSETS)

Expand Down
40 changes: 1 addition & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,35 +117,6 @@ of the chart — **instrument gauges**, custom overlays, routes, and more — wi
forking the core. NMEA 0183 own-ship and AIS are the first slice of that; expect
the surface to grow and change.

## 🐳 Run with Docker

The simplest way to run chartplotter — and the primary path for the
**server-hub-on-a-boat** model (a Raspberry Pi, laptop, or mini PC that holds all
chart state while every screen just points a browser at it) — is the published
container image:

```sh
docker run -p 8080:8080 -v chartplotter-data:/data \
ghcr.io/beetlebugorg/chartplotter
# open http://localhost:8080
```

Or with Docker Compose ([`compose.yaml`](compose.yaml)):

```sh
docker compose up -d
```

The image is **multi-arch** (`linux/amd64` + `linux/arm64`), so the same command
runs on a Raspberry Pi and on an amd64 box. It's built `FROM scratch` around a
**fully-static musl binary**, so it's tiny — essentially just the ~26 MB binary
plus a CA bundle. The named `/data` volume holds the ENC source, baked tiles, and
settings, and survives image upgrades. **macOS / Windows** users run the same
image via **Docker Desktop** — no native Mac/Windows binary needed.

Native binaries (below) remain available as a secondary option for bare-metal
installs.

## 📦 Install & build

**Download a binary.** Every tagged release publishes a self-contained
Expand All @@ -154,8 +125,7 @@ installs.
the archive for your platform and run it — the S-101 catalogue and web frontend
are baked in, so you supply only the ENC cells. **macOS** is not shipped as a
prebuilt binary (the engine links Apple frameworks Zig can't cross-compile) — Mac
users run the [Docker image](#-run-with-docker) via Docker Desktop, or build from
source below.
users build from source below.

Those published binaries embed the **IHO S-101 Portrayal and Feature Catalogues**
(compiled into libtile57 from the IHO's own GitHub repositories, which declare no
Expand Down Expand Up @@ -278,16 +248,8 @@ make vet # go vet ./...
make fmt # gofmt -w .
make serve # build + serve web/ on :8080
make xbuild # cross-compile with `zig cc` (linux + windows, amd64/arm64)
make musl # fully-static musl binaries (linux amd64+arm64) for the Docker image
```

The container image is built `FROM scratch` around the static musl binary (`make
musl` / the [`Dockerfile`](Dockerfile)); the engine is git-cloned inside the
builder, so no sibling checkout is needed to `docker build`. `zig cc`
cross-compiles both arches from one native builder — no QEMU — and
[`.github/workflows/docker.yml`](.github/workflows/docker.yml) pushes the
multi-arch image to GHCR on each `v*` tag.

CGO is required — libtile57 is the sole tile/portrayal engine, so
`CGO_ENABLED=0` does not build. Cross-compilation still works with **Zig as the
C toolchain** (`make xbuild` covers linux and windows; darwin must be built
Expand Down
32 changes: 0 additions & 32 deletions compose.yaml

This file was deleted.

Loading
Loading