Initial commit: Breadcrumb GPS trip viewer
Go server receiving Colota location data into SQLite, with a trip-segmentation API and embedded web frontend for browsing trips on a map.
This commit is contained in:
commit
c41a2c5411
6 changed files with 1268 additions and 0 deletions
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
FROM golang:1.22-alpine AS builder
|
||||
|
||||
# gcc is required for go-sqlite3 (CGO)
|
||||
RUN apk add --no-cache gcc musl-dev
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o breadcrumb .
|
||||
|
||||
# ── Runtime image ─────────────────────────────────────────────────────────────
|
||||
FROM alpine:3.19
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/breadcrumb .
|
||||
|
||||
# Data directory for the SQLite file (mount a volume here)
|
||||
RUN mkdir -p /data
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["./breadcrumb"]
|
||||
CMD ["-port", "8080", "-db", "/data/locations.db"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue